[GENERAL] Query too slow with not in condition

2008-11-30 Thread சிவகுமார் மா
Dear Friends, I have loaded the backup from a live database in a test system. Both run 8.3.5 versions. The plan for a query varies in these systems. Test System A. PostgreSQL 8.3.5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) B. explain select * from

Re: [GENERAL] Query too slow with not in condition

2008-11-30 Thread David Rowley
I have loaded the backup from a live database in a test system. Both run 8.3.5 versions. The plan for a query varies in these systems. Test System A. PostgreSQL 8.3.5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) B. explain select * from

Re: [GENERAL] Query too slow with not in condition

2008-11-30 Thread Tom Lane
David Rowley [EMAIL PROTECTED] writes: I assume workmem, effective_cache_size and random_page_cost are all the same in the 2 postgresql.conf? Indeed, work_mem is probably the problem. The critical difference between the two plans seems to be that the first one is using a hashed subplan and the

Re: [GENERAL] Query too slow with not in condition [Resolved]

2008-11-30 Thread சிவகுமார் மா
Thanks a lot. On Sun, Nov 30, 2008 at 11:28 PM, Tom Lane [EMAIL PROTECTED] wrote: David Rowley [EMAIL PROTECTED] writes: I assume workmem, effective_cache_size and random_page_cost are all the same in the 2 postgresql.conf? Indeed, work_mem is probably the problem. The critical

Re: [GENERAL] Query too slow with not in condition

2008-11-30 Thread சிவகுமார் மா
On Sun, Nov 30, 2008 at 3:28 PM, David Rowley [EMAIL PROTECTED] wrote: You might find this page interesting: http://www.depesz.com/index.php/2008/08/13/nulls-vs-not-in/ Thanks David. Another issue I was faced with was exactly what the link you provided discusses. Best regards, Ma Sivakumar