> The WHERE condition can be divided into a "slowly changing" part and in
> a "random" one. The random part is the one I change at every query to avoid
> result caching.

The first query will leave in cache at least many of the index pages needed
by the second query, and likely actual rows needed by the second query.

> Disk cache could explain the thing, but then why I got the high performances
> after the partial index has been created? By chance?

Creating the partial index reads rows, and the pages are left in the disk
cache. The only way to do proper comparisons is to reboot between trials in
order to compare queries with cold caches, or use the latter of multiple
runs in order to compare queries with hot caches.

-- 
Scott Ribe
scott_r...@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to