[PERFORM] Costly Sort Key on indexed timestamp column

2004-09-09 Thread ogjunk-pgjedan
Hello, I'm tuning my PostgreSQL DB (7.3.4) and have come across a query that doesn't use an index I created specially for it, and consequently takes circa 2 seconds to run. :( The ugly query looks like this (the important part is really at the very end - order by piece): select userinfo1_.id as

Re: [PERFORM] Costly Sort Key on indexed timestamp column

2004-09-09 Thread Tom Lane
[EMAIL PROTECTED] writes: I'm tuning my PostgreSQL DB (7.3.4) and have come across a query that doesn't use an index I created specially for it, and consequently takes circa 2 seconds to run. :( ... The output of EXPLAIN ANALYZE follows. Note how 99% of the total cost comes from Sort Key: