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

2009-04-16 Thread Tom Lane
Alexander Steffens writes: > I assume there is now a hashed ANTI-SEMI-JOIN operator implemented? What does EXPLAIN say about it? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql

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

2009-04-16 Thread Alexander Steffens
Congratulations PostgreSQL-Team for your work! with the current 8.4 B1 Version of PostgreSQL the bad execution time of my example-Query containing a NOT EXISTS changed from "aborted after hours" to just 5 seconds - double as quick as my result with MS-SQL. That's wonderful! > insert into t1 > se

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

2007-12-19 Thread Alexander Steffens
So sorry, I send you only the half of information: MS-SQL uses the the plan with only nested loops when i have abt less than 100 tuples in both the tables (="small") when t1 gets abt > 1000 tuples (="medium") it switches to the hash-anti-semi-join, when both tables gets more than 1000 tuples (="bi

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

2007-12-18 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > "Tom Lane" <[EMAIL PROTECTED]> writes: >> It's possible that MS-SQL is doing something analogous to the >> hashed-subplan approach (hopefully with suitable tweaking for the NULL >> case) but even then it's hard to see how it could take only 9 sec. >> The

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

2007-12-18 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > It's possible that MS-SQL is doing something analogous to the > hashed-subplan approach (hopefully with suitable tweaking for the NULL > case) but even then it's hard to see how it could take only 9 sec. > The cartesian product is too big. Fwiw it seems MS

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

2007-12-18 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: >> 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.

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

2007-12-18 Thread Gregory Stark
"Alexander Steffens" <[EMAIL PROTECTED]> 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 * fr

[BUGS] BUG #3826: Very Slow Execution of examplequery (wrong plan?)

2007-12-18 Thread Alexander Steffens
The following bug has been logged online: Bug reference: 3826 Logged by: Alexander Steffens Email address: [EMAIL PROTECTED] PostgreSQL version: 8.3b4 Operating system: Win2003R2x64 Description:Very Slow Execution of examplequery (wrong plan?) Details: Hello, I have