postgres 7.1.3: why does the query plan ignore indexes?
| От | Marco Vezzoli |
|---|---|
| Тема | postgres 7.1.3: why does the query plan ignore indexes? |
| Дата | |
| Msg-id | 3F41E343.AE3B5E@st.com обсуждение исходный текст |
| Ответы |
Re: postgres 7.1.3: why does the query plan ignore indexes?
|
| Список | pgsql-sql |
Hi, I know this question was asked many times, but please help me understand what I am doing wrong. I work with a postgresql 7.1.3 on Solaris 8 compiled with gcc 3.0.2 Some indexes are defined on a table ewsweb_test=> \d measures_product Index "measures_product"Attribute | Type ------------+----------product_id | smallint btree ewsweb_test=> \d measures_date Index "measures_date"Attribute | Type -----------+--------------------------date | timestamp with time zone btree but the query seems to ignore it. ewsweb_test=> explain select zero_yield, gross from measures where product_id=29 and date between '2003-03-12' and '2003-08-14'; NOTICE: QUERY PLAN: Seq Scan on measures (cost=0.00..12937.76 rows=254 width=12) EXPLAIN I know there is an option that alter the seq scan cost but I prefer to leave the optimizer as clean as possible. Thanks in advence for any help.Marco -- Marco Vezzoli tel. +39 039 603 6852 STMicroelectronics fax. +39 039 603 5055
В списке pgsql-sql по дате отправления: