Re: performance question (something to do w/ parameterized

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

 



Jeffrey Tenny <jeffrey.tenny@xxxxxxxxxxx> writes:
> I dropped the multicolumn index 'testindex2',  and a new explain analyze 
> looks like this:

>   Sort  (cost=35730.71..35768.28 rows=1503 width=16) (actual 
> time=962.555..964.467 rows=677 loops=1)
>     Sort Key: f, c
>     ->  Seq Scan on x  (cost=0.00..34937.60 rows=1503 width=16) (actual 
> time=5.449..956.594 rows=677 loops=1)
>           Filter: ((f = 1) OR (f = 2) OR (f = 3) ...

> Turning on the server debugging again, I got roughly identical
> query times with and without the two column index.

That's good, actually, seeing that the planner thinks they're close to
the same speed too.  Now try "set enable_seqscan = off" to see if you
can force the multi-index-scan plan to be chosen, and see how that does.

			regards, tom lane


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

  Powered by Linux