Re: is it possible to get the optimizer to use indexes
От | Dave Cramer |
---|---|
Тема | Re: is it possible to get the optimizer to use indexes |
Дата | |
Msg-id | 1071803317.1629.16.camel@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: is it possible to get the optimizer to use indexes (Christopher Kings-Lynne <chriskl@familyhealth.com.au>) |
Ответы |
Re: is it possible to get the optimizer to use indexes
Re: is it possible to get the optimizer to use indexes |
Список | pgsql-performance |
after vacuum verbose analyze, I still get explain select * from isppm where item_upc_cd like '06038301234'; QUERY PLAN ----------------------------------------------------------------------- Seq Scan on isppm (cost=100000000.00..100009684.89 rows=2 width=791) Filter: (item_upc_cd ~~ '06038301234'::text) (2 rows) isp=# explain select * from isppm where item_upc_cd = '06038301234'; QUERY PLAN ------------------------------------------------------------------------ Index Scan using isppm_x0 on isppm (cost=0.00..5.86 rows=2 width=791) Index Cond: (item_upc_cd = '06038301234'::bpchar) (2 rows) Dave On Thu, 2003-12-18 at 20:38, Christopher Kings-Lynne wrote: > > It appears that the optimizer only uses indexes for = clause? > > The optimizer will used indexes for LIKE clauses, so long as the clause > is a prefix search, eg: > > SELECT * FROM test WHERE a LIKE 'prf%'; > > Chris > >
В списке pgsql-performance по дате отправления: