Search Postgresql Archives

Re: weird query runtime results...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux