Re: Query optimization (select single record and join)

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Query optimization (select single record and join)
Дата
Msg-id 46852373.80608@archonet.com
обсуждение исходный текст
Ответ на Query optimization (select single record and join)  ("Orest Kozyar" <orest.kozyar@gmail.com>)
Список pgsql-general
Orest Kozyar wrote:
> What I am wondering is whether the database first eliminate all rows in
> tableA that don't meet the criteria before performing the join, or does it
> perform the join first then eliminate all records that don't meet the
> criteria?

If you use "EXPLAIN SELECT ..." then PostgreSQL will tell you how it's
going to execute your query. If you use "EXPLAIN ANALYZE SELECT ..." it
will tell you what it actually did too. See manuals and google for
details and discussion.

Oh, and if you don't know about VACUUM and ANALYZE you'll probably want
to read up on those too.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: CG
Дата:
Сообщение: xpath_string namespace issue...
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: db replication