X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B5D2BD1B55A for ; Fri, 31 Oct 2003 21:28:08 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 83022-08 for ; Fri, 31 Oct 2003 17:27:39 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id A3DDAD1B4E9 for ; Fri, 31 Oct 2003 17:27:36 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9VLRVX6019925; Fri, 31 Oct 2003 16:27:31 -0500 (EST) To: Jeff Cc: "PostgreSQL" , pgsql-admin@postgresql.org Subject: Re: SELECT COUNT(*)... returns 0 ROWS In-reply-to: <20031031144737.0faca65f.threshar@torgo.978.org> References: <20031031144737.0faca65f.threshar@torgo.978.org> Comments: In-reply-to Jeff message dated "Fri, 31 Oct 2003 14:47:37 -0500" Date: Fri, 31 Oct 2003 16:27:31 -0500 Message-ID: <19924.1067635651@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/425 X-Sequence-Number: 10986 Jeff writes: > "PostgreSQL" wrote: >> Why the result us CERO? the table have 1.400.000 rows! > 1. did you remember to load data? > 2. did someone accidentally delete the data? > 3. are you connected to the correct db (I've panic'd before but realized > I was on dev, not production!)? > 4. sure that is the right table? I'm wondering about MVCC-related conditions, which adds a couple more questions: 5. Did you actually commit the transaction that loaded the rows? 6. Are you doing the SELECT COUNT(*) in a transaction that started before the data-loading transaction committed? regards, tom lane