Re: query faster using LEFT OUTER join?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: query faster using LEFT OUTER join?
Дата
Msg-id 45616764.1040902@archonet.com
обсуждение исходный текст
Ответ на query faster using LEFT OUTER join?  (Drew <drewmwilson@fastmail.fm>)
Список pgsql-sql
Drew wrote:
> I have a planner question about a multi-join query, where if I rewrite 
> the query excluding the table that is left joined to the other tables my 
> query speed increases by 75%.

> Here's the plan for the first query (using 8.2b3)
>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> 
> HashAggregate  (cost=3223.17..3223.41 rows=19 width=18) (actual 
> time=34.913..34.978 rows=122 loops=1)

> And here's the plan for the second query without the first LEFT OUTER 
> join (using 8.2b3)
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> 
> HashAggregate  (cost=8927.87..8936.89 rows=721 width=18) (actual 
> time=39.484..39.551 rows=122 loops=1)

Query1: 34.9ms
Query2: 39.5ms

I'm not seeing a huge difference here. Are these the right EXPLAINs?

--   Richard Huxton  Archonet Ltd


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

Предыдущее
От: Chris Tennant
Дата:
Сообщение: Re: planner used functional index in 7.3.6, now does a seq
Следующее
От: "Rajesh Kumar Mallah"
Дата:
Сообщение: tsvector_eq appears to be inconsistent.