Join efficiency

Поиск
Список
Период
Сортировка
От Russ Brown
Тема Join efficiency
Дата
Msg-id opsdncpjgfg2z5qo@relay.plus.net
обсуждение исходный текст
Ответы Re: Join efficiency  (<terry@ashtonwoodshomes.com>)
Re: Join efficiency  (Richard Huxton <dev@archonet.com>)
Re: Join efficiency  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Join efficiency  (Laura Vance <vancel@winfreeacademy.com>)
Re: Join efficiency  (Jeff Boes <jboes@qtm.net>)
Список pgsql-general
Hello all,

Recently a post on this list made me think a bit about the way in which I
write my queries.

I have always written queries with ordinary joins in this manner:

SELECT * FROM a, b WHERE a.x=b.x;

However I recently saw an laternative syntax:

SELECT * FROM a JOIN b ON a.x=b.x;

Is there any difference between these queries in terms of the speed of
planning or the quality of the plan untimately used? I'd imagine that the
second form provides more information that the planner may be able to use
to make a better plan (or make a good plan more easily), but I've never
had any problems with the first form.

It also seems to me that the second form is more self-documenting, which
is something I'm always in favour of.

I'd appreciate anyone's thought/insight.

Thanks.

--

Russell Brown

В списке pgsql-general по дате отправления:

Предыдущее
От: Prabu Subroto
Дата:
Сообщение: insertiing an image file (blob) into postres...
Следующее
От:
Дата:
Сообщение: Re: Join efficiency