Re: [GENERAL] Diferences between IN and EXISTS?

2013-02-04 Thread zeljko
Edson Richter wrote: Hi! Assumptions: PostgreSQL 9.2.2, Win64, already run vacumm full freeze analyze. No problems in the database. I know there are 1247 records to be found. Why does these queries return different results: select count(*) from parcela where id not in (select

Re: [GENERAL] Diferences between IN and EXISTS?

2013-02-04 Thread Thomas Kellerer
zeljko, 04.02.2013 10:35: Edson Richter wrote: Hi! Assumptions: PostgreSQL 9.2.2, Win64, already run vacumm full freeze analyze. No problems in the database. I know there are 1247 records to be found. Why does these queries return different results: select count(*) from parcela where id not

Re: [GENERAL] Diferences between IN and EXISTS?

2013-02-04 Thread zeljko
Thomas Kellerer wrote: zeljko, 04.02.2013 10:35: Edson Richter wrote: Hi! Assumptions: PostgreSQL 9.2.2, Win64, already run vacumm full freeze analyze. No problems in the database. I know there are 1247 records to be found. Why does these queries return different results: select

Re: [GENERAL] Diferences between IN and EXISTS?

2013-02-04 Thread Edson Richter
Em 04/02/2013 07:35, zeljko escreveu: Edson Richter wrote: Hi! Assumptions: PostgreSQL 9.2.2, Win64, already run vacumm full freeze analyze. No problems in the database. I know there are 1247 records to be found. Why does these queries return different results: select count(*) from parcela

Re: [GENERAL] Diferences between IN and EXISTS?

2013-02-03 Thread Fabrízio de Royes Mello
On Sun, Feb 3, 2013 at 3:31 AM, Edson Richter edsonrich...@hotmail.comwrote: Ok, I get it. Good education! Thank you very much, saved me a big headache! Also Bruce Momjian wrote some articles about NULLs [1] and one of them is about NOT IN [2] Best Regards, [1]

[GENERAL] Diferences between IN and EXISTS?

2013-02-02 Thread Edson Richter
Hi! Assumptions: PostgreSQL 9.2.2, Win64, already run vacumm full freeze analyze. No problems in the database. I know there are 1247 records to be found. Why does these queries return different results: select count(*) from parcela where id not in (select parcela_id from

Re: [GENERAL] Diferences between IN and EXISTS?

2013-02-02 Thread Pavel Stehule
Hello 2013/2/3 Edson Richter edsonrich...@hotmail.com: Hi! Assumptions: PostgreSQL 9.2.2, Win64, already run vacumm full freeze analyze. No problems in the database. I know there are 1247 records to be found. Why does these queries return different results: select count(*) from parcela

Re: [GENERAL] Diferences between IN and EXISTS?

2013-02-02 Thread Edson Richter
Ok, I get it. Good education! Thank you very much, saved me a big headache! Edson Em 03/02/2013 03:06, Pavel Stehule escreveu: Hello 2013/2/3 Edson Richter edsonrich...@hotmail.com: Hi! Assumptions: PostgreSQL 9.2.2, Win64, already run vacumm full freeze analyze. No problems in the