Need help on creating index for a query w/ 4 greater-than conditions

Поиск
Список
Период
Сортировка
От Fan Chi Kam
Тема Need help on creating index for a query w/ 4 greater-than conditions
Дата
Msg-id Pine.SOL.4.10.10003010918240.4422-100000@imsp234.hkstar.com
обсуждение исходный текст
Список pgsql-sql
What sort of indexing I should use if I try to run the following query?

SELECT part_id  FROM part   WHERE dimen1 >= ? and dimen2 >= ? and dimen3 >= ? and dimen4 >= ?  ORDER BY dimen1, dimen2,
dimen3,dimen4  LIMIT 100;
 

I tried creating index on the dimen1, dimen2, dimen3, and dimen4 columns,
but this dosn't help at all.  The query plan I always get is sorting
followed by a seq scan.

Sort  (cost=2822.86 rows=622 width=96) ->  Seq Scan on part  (cost=2822.86 rows=622 width=96)

Thanks




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: [SQL] prob with aggregate and group by - returns multiplesh
Следующее
От: Elsa Campos
Дата:
Сообщение: Help Me!!!!