Re: index scan forward vs backward = speed difference of 357X slower!

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

 



Kevin Traster <ktraster@xxxxxxxxxxxxxxxxxxx> wrote:
 
> I have indexes also on activity and mfiled (both btree) - wouldn't
> the database use them? - Kevin
 
It will use them if they are part of the plan which had the lowest
cost when it compared the costs of all possible plans.
 
You haven't really shown us the schema, so there's more guesswork
involved in trying to help you than there could be.  This page might
be worth reviewing:
 
http://wiki.postgresql.org/wiki/SlowQueryQuestions
 
In particular, if there are indexes that aren't being used which you
think should be, there is a good chance that either there is a type
mismatch or your costing factors may need adjustment.
 
-Kevin

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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux