| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Equivalent queries and the planner |
| Дата | |
| Msg-id | 20051015142405.GC14113@svana.org обсуждение |
| Ответ на | Equivalent queries and the planner ("John D. Burger" <john@mitre.org>) |
| Список | pgsql-general |
On Fri, Oct 14, 2005 at 09:43:57AM -0400, John D. Burger wrote: > (By the way, gazPlaces.gazPlaceID below is a primary key, so should be > unique - I think that's required for these to be equivalent. I tested > the two queries on small data sets, and they do indeed return the same > results.) I think that you also have to be sure that gazPlaceID is never NULL. AFAIK the PostgreSQL doesn't track that sort of thing at all at the planning/optimisation stage. You're right, sometimes statements are equivalent but usually there is some corner case (like NULLs, duplicate values, etc) that screw it up for the general case. Teaching the planner all that is something not yet done. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера