Re: performance advice needed: join vs explicit subselect

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: performance advice needed: join vs explicit subselect
Дата
Msg-id 20090127225828.GH3820@merkur.hilbert.loc
обсуждение исходный текст
Ответ на Re: performance advice needed: join vs explicit subselect  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tue, Jan 27, 2009 at 05:30:23PM -0500, Tom Lane wrote:

> Karsten Hilbert <Karsten.Hilbert@gmx.net> writes:
> > the explain analyze of which is (I've actually gotten it to
> > work better in the meantime as you can see):
>
> Looks like most of the problem is in the subquery scans on v_staff,
> which seems to be a rather expensive view :-(.  Maybe you can
> simplify that a bit.

Thanks so much. I wasn't quite sure how to correlate the
seemingly expensive parts of the explain with the view/query
parts. Will experiment with that...

Well, going directly to the dem.staff table below
dem.v_staff forces me to forego the actual name of the staff
entry - but the alias will need to suffice ;-)

This brings down query time from 2000ms to 7ms.

Our doctors won't complain about slow lab data retrieval
anymore ... ;-)

Thanks,
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: performance advice needed: join vs explicit subselect
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: New 8.4 hot standby feature