Re: BUG #3826: Very Slow Execution of examplequery (wrong plan?)

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Alexander Steffens" <mail(at)a-st(dot)de>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #3826: Very Slow Execution of examplequery (wrong plan?)
Date: 2007-12-18 20:21:50
Message-ID: 87tzmfkb35.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Alexander Steffens" <mail(at)a-st(dot)de> writes:

> Hello, I have found an Query (with data)
> that need to execute on MS-SQL 2005 < 9sec,
> on Postgresql I will stop it now after more than 30 mins:

> insert into t1
> select distinct (t1.a + t2.a)*2
> from t1,t2
> where not exists (
> select * from t1 tt where tt.a = (t1.a + t2.a)*2
> )

What plan does MS-SQL use to complete this? I wonder whether it's producing
the same answer Postgres is.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-12-18 22:18:50 Re: BUG #3826: Very Slow Execution of examplequery (wrong plan?)
Previous Message Alexander Steffens 2007-12-18 19:22:26 BUG #3826: Very Slow Execution of examplequery (wrong plan?)