Re: performance question (something to do w/ parameterized - Mailing list pgsql-performance

From Tom Lane
Subject Re: performance question (something to do w/ parameterized
Date
Msg-id 29684.1147121398@sss.pgh.pa.us
Whole thread Raw
In response to Re: performance question (something to do w/ parameterized  (Jeffrey Tenny <jeffrey.tenny@comcast.net>)
Responses Re: performance question (something to do w/ parameterized
List pgsql-performance
Jeffrey Tenny <jeffrey.tenny@comcast.net> 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

pgsql-performance by date:

Previous
From: Jeffrey Tenny
Date:
Subject: Re: performance question (something to do w/ parameterized
Next
From: Michael Stone
Date:
Subject: Re: Memory and/or cache issues?