Ad Widget

Collapse

1.6.2 - charts page does not open

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • urvancevav
    Junior Member
    • Sep 2008
    • 13

    #1

    1.6.2 - charts page does not open

    Then I try to open monitoring->charts, that occurs nothing.
    On postgres i see long-running query:
    Code:
    select t.itemid, t.clock from trends t where itemid in (45430,45432) order by t.itemid, t.clock limit 1;
    The problem in
    Code:
    limit 1
    part.
    Without that query executed instantly.

    I use PostgreSQL 8.3.6 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.3.real (Ubuntu 4.3.2-1ubuntu12) 4.3.2
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    You mean that "limit 1" is a source of a problem??? Very interesting why..
    Zabbix | ex GUI developer

    Comment

    • urvancevav
      Junior Member
      • Sep 2008
      • 13

      #3
      Originally posted by Aly
      You mean that "limit 1" is a source of a problem??? Very interesting why..
      Don't known why. But query with "limit 1" superimposes exclusive locking

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        This what I've found:
        Limit would have tried to fetch two rows from the underlying plan.
        If only one matching row is actually available, this would result in
        scanning the whole source table.
        This comment dated by 2002.. I hardly believe that this issue is still unresolved. But my tests on pgsql 8.3.1 behaves exactly in this manner
        Zabbix | ex GUI developer

        Comment

        • urvancevav
          Junior Member
          • Sep 2008
          • 13

          #5
          I found this thread, dated by 2008:


          looks that is postrges bug.

          P.S. This query executes very quickly:
          Code:
          select t.itemid, t.clock from trends t where itemid=45432 order by t.itemid, t.clock limit 1;

          Comment

          Working...