Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UiS8A-0000O9-U6 for pgsql-bugs@arkaria.postgresql.org; Fri, 31 May 2013 16:24:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UiS89-0003p3-RU for pgsql-bugs@arkaria.postgresql.org; Fri, 31 May 2013 16:24:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UiQrF-0006dv-C3 for pgsql-bugs@postgresql.org; Fri, 31 May 2013 15:03:09 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UiQrC-0000gW-Dk for pgsql-bugs@postgresql.org; Fri, 31 May 2013 15:03:09 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UiQrB-0005BI-OO for pgsql-bugs@postgresql.org; Fri, 31 May 2013 15:03:05 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UiQr6-0008IE-IG for pgsql-bugs@postgresql.org; Fri, 31 May 2013 15:03:00 +0000 Date: Fri, 31 May 2013 15:03:00 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #8196: problem with left join and is null check To: pgsql-bugs@postgresql.org From: aray1985@yahoo.com X-Pg-Spam-Score: -0.4 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8196 Logged by: Ara Email address: aray1985@yahoo.com PostgreSQL version: 9.1.9 Operating system: ubuntu Description:=20=20=20=20=20=20=20=20 I have to tables which I'm joining with left join query. SELECT count(*) FROM table A LEFT JOIN table B ON ... result has 200 000 rows, for 190 000 of them there is no value for columns of table B (result of join) ISSUE: When I'm trying to filter result with WHERE B.some_column IS NULL query works more then 5 min (never waited for result).=20 MORE INFO: When I'm filtering results with WHERE B.some_column IS NULL OR B.some_column =3D 'some value that some_column would never had' the query takes 2 second = and gives normal result (190 000). --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs