R: R: Query plan on identical tables differs . Why ?

From: "Fabio Panizzutti" <panizzutti(at)interlogica(dot)net>
To: "'Manfred Koizar'" <mkoi-pg(at)aon(dot)at>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: R: R: Query plan on identical tables differs . Why ?
Date: 2004-05-14 09:22:44
Message-ID: 001101c43995$03e8b830$3c02020a@ufficio
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>>>> Index Scan using pk_storico_misure_2 on storico_misure
>>>>(cost=0.00..1984.64 rows=658 width=21) (actual
>>>time=723.441..1858.107
>>>>rows=835 loops=1)
>>>> Index Cond: ((data_tag > '2004-05-03
>>>00:00:00'::timestamp without
>>>>time zone) AND (data_tag < '2004-05-12 00:00:00'::timestamp without
>>>>time
>>>>zone) AND (tag_id = 37423))
>>>
>>>Either most of the time is spent skipping index tuples in
>>>the data_tag range 2004-05-03 to 2004-05-12 which have
>>>tag_id <> 37423, or getting those 835 rows causes a lot of
>>>disk seeks.
>>>
>>>If the former is true, an index on (tag_id, data_tag) will help.
>>>
Is true , i recreate the indexes making an index on (tag_id, data_tag)
and works fine .

>>>In your first message you wrote:
>>>>fsync = false
>>>
>>>Do this only if you don't care for your data.
>>>

I set it to false , for performance tests .I've a stored procedure that
make about 2000 insert in 2 tables and 2000 delete in another and with
fsync false perfomrmance are 2.000 -3.000 ms (stable) with fsync 3.000
ms to 15.000 ms . I trust in my hardware an O.S so fsync setting is a
big dubt for my production enviroment .

Thanks a lot

Bye

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-05-14 09:55:17 Re: R: R: Query plan on identical tables differs . Why ?
Previous Message Fabio Panizzutti 2004-05-14 08:55:07 R: R: Query plan on identical tables differs . Why ?