BUG #8196: problem with left join and is null check

From: aray1985(at)yahoo(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8196: problem with left join and is null check
Date: 2013-05-31 15:03:00
Message-ID: E1UiQr6-0008IE-IG@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 8196
Logged by: Ara
Email address: aray1985(at)yahoo(dot)com
PostgreSQL version: 9.1.9
Operating system: ubuntu
Description:

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).

MORE INFO:
When I'm filtering results with WHERE B.some_column IS NULL OR B.some_column
= 'some value that some_column would never had' the query takes 2 second and
gives normal result (190 000).

Browse pgsql-bugs by date

  From Date Subject
Next Message healthycomputers 2013-05-31 18:34:37 BUG #8197: Error Message When trying to install PS8.1
Previous Message warren_brodie 2013-05-30 21:15:25 BUG #8195: Postgre SQL Database displayed as log in even after running a hide command on terminal