postgresql - slowest queries

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Major
    • 1.8.2
    • Affects Version/s: 1.8.2
    • Component/s: Server (S)
    • None
    • Environment:
      debian lenny, zabbix 1.8.2, postgresql 8.3

      I tried to log slow queries. Slowest queries are of this type for example:

      select value from history_uint where itemid=23287 and clock<=1273669687 order by clock desc limit 2;

      It selects many thousand lines, and takes several seconds to perform. Finally, it selects only 2 rows with LIMIT.

      I propose that find this SQL query and restrict choice from clock.

            Assignee:
            Unassigned
            Reporter:
            Martin Janda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: