Re: Yet another indexing issue.

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Yet another indexing issue.
Дата
Msg-id 20020319124955.M2427-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Yet another indexing issue.  ("David Siebert" <david@eclipsecat.com>)
Ответы Re: Yet another indexing issue.  ("David Siebert" <david@eclipsecat.com>)
Список pgsql-general
On Tue, 19 Mar 2002, David Siebert wrote:

>
> I am having issues with an Index.
> Here is the query
>
> SELECT * FROM phonecalls WHERE istatus = 0 AND (sfor = 'pat' OR
> sfor='TECHIES') ORDER BY ipri DESC, dplaceddate;
> I have tried '0' and jut plain 0 as well as type casting it with ::int4 .
>
> Here is the index I think it should use.
>
> CREATE INDEX phonecallspoll ON phonecalls USING btree (sfor varchar_ops,
> istatus int4_ops);
> But it is still doing a scan?
>
> Any suggestions?
> yes I have used Vacumme with the anylise option.

What is the schema (probably not meaningful but always helps), what does
explain show for the query (specifically for the row counds), does using
set enable_seqscan=off change the explain output?



В списке pgsql-general по дате отправления:

Предыдущее
От: Jean-Luc Lachance
Дата:
Сообщение: Re: [SQL] How to create crude report with psql and/or plpgsql
Следующее
От: Sudhakar Chandra
Дата:
Сообщение: [Q] Distributing a binary of postgres with my software and license