| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Re: Does PostgreSQL support EXISTS? |
| Дата | |
| Msg-id | 20010613195011.A31062@svana.org обсуждение исходный текст |
| Ответ на | Re: Re: Does PostgreSQL support EXISTS? (Michael Meskes <meskes@postgresql.org>) |
| Список | pgsql-general |
On Wed, Jun 13, 2001 at 09:21:02AM +0200, Michael Meskes wrote: > On Wed, Jun 13, 2001 at 12:23:15PM +1000, Martijn van Oosterhout wrote: > > select x from a where v in (select v from b) > > select x from a where exists (select 1 from b where a.v = b.v) > > The latter should be faster than the former on every relational database > system. Huh? Since they do the same thing should they (in theory) run in the same time. Now, I can imagine most DBMSs would optimes the latter better than the forward, but that doesn't change the theory. In theory someone should be able to program postgres' rule rewrite to rewrite the former to the latter and then they would execute identically. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера