Re: faster search
| От | Cosimo Streppone |
|---|---|
| Тема | Re: faster search |
| Дата | |
| Msg-id | 42AAC593.4050406@streppone.it обсуждение исходный текст |
| Ответ на | Re: faster search (Steve Atkins <steve@blighty.com>) |
| Список | pgsql-performance |
Steve Atkins wrote:
> On Fri, Jun 10, 2005 at 01:45:05PM -0400, Clark Slater wrote:
>
>>Hi-
>>
>>Would someone please enlighten me as
>>to why I'm not seeing a faster execution
>>time on the simple scenario below?
>
> [...]
>
> Create an index on (productlistid, typeid, partnumber) then
>
> select * from test where productlistid=3 and typeid=9
> order by productlistid, typeid, partnumber LIMIT 15;
>
Clark, try also adding (just for testing) partnumber to your
where clause, like this:
select * from test where productlistid=3 and typeid=9
and partnumber='foo' order by productlistid,
typeid, partnumber;
and check output of explain analyze.
I had experiences of planner "bad" use of indexes when attribute
types were integer and cardinality was low (a single attribute
value, like "typeid=9" selects one or few rows).
However, this was on 7.1.3, and probably is not relevant to your case.
--
Cosimo
В списке pgsql-performance по дате отправления: