| От | |
|---|---|
| Тема | Re: Using the IN clauise |
| Дата | |
| Msg-id | 000801c27c55$ed66d900$2766f30a@development.greatgulfhomes.com обсуждение исходный текст |
| Ответы |
Re: Using the IN clauise
|
| Список | pgsql-general |
My post didn't go through the first time, so here goes again: > > > I thought I read somewhere that it was better to avoid using > the IN clause (at least when that means doing a subselect) > for efficiency reasons, but I cannot find it on the website now. > > Does anyone know where that is? > > And can someone confirm the following: > > This: > SELECT t1.f1 > FROM t1 > WHERE t1.f1 IN (select f1 from t2 AS t2 where t2.f1 = t1.f1 > AND t2.f2 = 'v1') > > is generally slower to run then: > SELECT t1.f1 > FROM t1, t2 > WHERE t1.f1 = t2.f1 > AND t2.f3 = 'v1' > > Thanks > > Terry Fielder > Network Engineer > Great Gulf Homes / Ashton Woods Homes > terry@greatgulfhomes.com > >
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера