Re: why isn't index used?
| От | Thomas O'Dowd |
|---|---|
| Тема | Re: why isn't index used? |
| Дата | |
| Msg-id | 1034038475.20171.134.camel@beast.uwillsee.com обсуждение исходный текст |
| Ответ на | Re: why isn't index used? (Martijn van Oosterhout <kleptog@svana.org>) |
| Список | pgsql-general |
Martijn, > You picked it. The parser reads your number as an int4 and the planner > assumes that you can't use int4's on an int8 index. It sounds brain-dead. It > is brain-dead, except that it's also not easy to fix. Putting quotes around > the number means the planner will treat it as unknown and it works. Thanks for the reply. It would be great to get this added to the DOCS so that the next person doesn't spend a day trying to figure it out too. Also, which is faster: using '3' or 3::int8? I presume shorter is quicker to parse, but is there an advantage over treating it as an unknown and an explicit cast? Tom. -- Thomas O'Dowd. - Nooping - http://nooper.com tom@nooper.com - Testing - http://nooper.co.jp/labs
В списке pgsql-general по дате отправления: