From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Michael Thorsen" <mthorsen1980(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: SQL query |
Date: | 2008-11-22 18:17:15 |
Message-ID: | 29116.1227377835@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Michael Thorsen" <mthorsen1980(at)gmail(dot)com> writes:
> ... I gave a simple example above, but the query runs over 2 tables
> with about a million entries in each. So I am unable to verify what is
> wrong, but I know the count is incorrect as I should not have more than what
> is in the user_table.
You could easily get a count larger than the number of rows in
user_table, if there are rows in user_table that join to multiple rows
in the locations table. So look for duplicated data in locations ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2008-11-22 19:56:27 | delete commands fails silently to delete primary key |
Previous Message | Shane Ambler | 2008-11-22 18:04:27 | Re: Using Postgres to store high volume streams of sensor readings |