Re: Yet another 'why does it not use my index' question.
В списке pgsql-performance по дате отправления:
| От | Bruno Wolff III |
|---|---|
| Тема | Re: Yet another 'why does it not use my index' question. |
| Дата | |
| Msg-id | 20030507162815.GA27158@wolff.to обсуждение исходный текст |
| Ответ на | Yet another 'why does it not use my index' question. ("Ryan" <pgsql-performance@seahat.com>) |
| Ответы |
Re: Yet another 'why does it not use my index' question.
|
| Список | pgsql-performance |
On Wed, May 07, 2003 at 09:11:49 -0500, Ryan <pgsql-performance@seahat.com> wrote: > I wanted to do the following: > > midas=# explain analyze select * from zip where zip in > (select option_value from client_options where option_name = 'ZIP_CODE' ); Until 7.4 comes out IN will be slow and you should use a join to do this. > midas=# explain analyze select * from zip z, client_options c where > c.option_name = 'ZIP_CODE' and c.option_value = z.zip; I think the problem here might be related to option_value being text and zip being char varying. This might prevent an index from being used to do the join.
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера