Skip site navigation (1) Skip section navigation (2)

Fwd: 8.2 Query 10 times slower than 8.1 (view-heavy)

From: "Evan Carroll" <lists(at)evancarroll(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Fwd: 8.2 Query 10 times slower than 8.1 (view-heavy)
Date: 2007-08-28 16:24:57
Message-ID: 428b865e0708280924ye13ead1j5c198778cdea9c6@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
---------- Forwarded message ----------
From: Evan Carroll <me(at)evancarroll(dot)com>
Date: Aug 28, 2007 11:23 AM
Subject: Re: [PERFORM] 8.2 Query 10 times slower than 8.1 (view-heavy)
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>


On 8/28/07, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> I looked through your query plan, and this is what stood out in the 8.2 plan:
>
>          ->  Nested Loop Left Join  (cost=8830.30..10871.27 rows=1
> width=102) (actual time=2148.444..236018.971 rows=62 loops=1)
>                Join Filter: ((public.contact.pkid =
> public.contact.pkid) AND (public.event.ts_in > public.event.ts_in))
>                Filter: (public.event.pkid IS NULL)
>
> Notice the misestimation is by a factor of 62, and the actual time
> goes from 2149 to 236018 ms.
>
> Again, have you analyzed your tables  / databases?
>
contacts=# \o scott_marlowe_test
contacts=# VACUUM FULL ANALYZE;
contacts=# SELECT * FROM test_view WHERE U_ID = 8;
Cancel request sent
ERROR:  canceling statement due to user request
contacts=# EXPLAIN ANALYZE SELECT * FROM test_view WHERE U_ID = 8;

output found at http://rafb.net/p/EQouMI82.html

--
Evan Carroll
System Lord of the Internets
me(at)evancarroll(dot)com
832-445-8877


-- 
Evan Carroll
System Lord of the Internets
me(at)evancarroll(dot)com
832-445-8877

In response to

Responses

pgsql-performance by date

Next:From: Evan CarrollDate: 2007-08-28 16:30:19
Subject: Re: 8.2 Query 10 times slower than 8.1 (view-heavy)
Previous:From: Evan CarrollDate: 2007-08-28 16:21:54
Subject: Re: 8.2 Query 10 times slower than 8.1 (view-heavy)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group