Re: Query organization question

Поиск
Список
Период
Сортировка
От Grzegorz Jaśkiewicz
Тема Re: Query organization question
Дата
Msg-id 2f4958ff0904271403l6ce5f87bj5b9fd1c979658db2@mail.gmail.com
обсуждение исходный текст
Ответ на Query organization question  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Ответы Re: Query organization question  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Список pgsql-general
>   exists (select ‘found_it’ from get_jobs(x.name) j where j.job =
> ‘carpenter’);
What does this function do ?
If it only runs on the tables, than simple join will do it pretty fast.
also, keeping job as integer, if table is large will save you some
space, make index lookup faster, and generally make everything faster.
Subselects always perform poor, so please try writing that query as
join first. Postgresql is capable of reordering, and choosing right
approach for query, this isn't mysql - you don't have try to outsmart
db.


--
GJ

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: triggers and execute...
Следующее
От: Richard Broersma
Дата:
Сообщение: Re: triggers and execute...