explain analyse and nested loop joins

Поиск
Список
Период
Сортировка
От Oliver Kohll - Mailing Lists
Тема explain analyse and nested loop joins
Дата
Msg-id 8690371E-0791-48D8-804F-1296215A6B31@gtwm.co.uk
обсуждение исходный текст
Список pgsql-general
Hi,

I have a query I'm trying to optimise. It takes just under a second to run, not too bad for my users but I'm worried
thatas the size of the data increases, it will get worse. Of course the plan may change when that happens but I'd also
liketo learn a bit more about optimisation anyway. 

The explain is here:

http://explain.depesz.com/s/Ost

- that one took 690ms. Seeing it had a couple of nested joins at the top, I 'set enable_nestloop = false;', resulting
inan improvement of about 20x: 

http://explain.depesz.com/s/BRi

The query is below. It joins to a second report dbvcalc_delivery_charges which I can also send if necessary. I've only
guessesas to the reasons the default plan is slow or how to affect it, can someone enlighten me? 

Regards
Oliver Kohll
www.agilebase.co.uk


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Distinct on a non-sort column
Следующее
От: Oliver Kohll - Mailing Lists
Дата:
Сообщение: Fwd: explain analyse and nested loop joins