From: | Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl> |
---|---|
To: | Kashmir <kashmir_us_1999(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: weird query runtime results... |
Date: | 2008-09-09 07:04:36 |
Message-ID: | 48C62004.70904@batory.org.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2008-09-09 05:07, Kashmir wrote:
> querying data from august 1st - august 25:
> Total runtime: 26762.999 ms
>
> now querying data from august 1st - august 29:
> Total runtime: 20123.584 ms
>
> Any idea why these analysises look so different? the only
> query-difference is the 2nd timestamp value, it is a little higher in
> the 2nd query...
Did you realize that this second query returns over 6 seconds faster
than first?
If you query a significant portion of data a table scan is faster than
using indexes as a drive does not need to seek that much.
You can control when it will switch to seq-scan tuning
seq_page_cost/random_page_cost parameters in postgresql.conf. But test
also other queries common for your usage.
Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
Winnie the Pooh
From | Date | Subject | |
---|---|---|---|
Next Message | Tomasz Ostrowski | 2008-09-09 07:30:23 | Re: 8.3 on FreeBSD 6.3, sudden performance degradations |
Previous Message | Mohd Fahadullah | 2008-09-09 06:21:16 | Server installation problem using freebsd ports |