Re: What does count(*) count? - Mailing list pgsql-general

From Együd Csaba
Subject Re: What does count(*) count?
Date
Msg-id 002101c3cfb9$cfc41760$230a0a0a@compaq
Whole thread Raw
In response to What does count(*) count?  (Együd Csaba <csegyud@vnet.hu>)
Responses Re: What does count(*) count?
Re: What does count(*) count?
List pgsql-general
Hi,
I've got it, but I don't know the reason of it.
In the database table the records have duplicated and I've two rows for
every primary key - with different OIDs.
Is there any safe method to get rid of only one of each duplicated row?
Very strange however...

Thank you,
-- Csaba




> -----Original Message-----
> From: Reid Thompson [mailto:Reid.Thompson@ateb.com]
> Sent: 2003. december 31. 15:26
> To: csegyud@vnet.hu
> Subject: RE: [GENERAL] What does count(*) count?
>
>
> scan the file visually and see if anything stands out.
>
> reid
>
>
> > -----Original Message-----
> > From: Együd Csaba [mailto:csegyud@vnet.hu]
> > Sent: Wednesday, December 31, 2003 8:07 AM
> > To: Reid Thompson
> > Subject: RE: [GENERAL] What does count(*) count?
> >
> >
> > Hi Reid,
> > I don't realy understand what you mean. Sholud I count all
> > the 'INSERT' rows by hand?
> >
> > -- Csaba
> >
> >
> > > -----Original Message-----
> > > From: Reid Thompson [mailto:Reid.Thompson@ateb.com]
> > > Sent: 2003. december 31. 13:46
> > > To: csegyud@vnet.hu
> > > Subject: RE: [GENERAL] What does count(*) count?
> > >
> > >
> > > vi sc.dump and see.
> > >
> > > reid
> > >
> > >
> > > > -----Original Message-----
> > > > From: Együd Csaba [mailto:csegyud@vnet.hu]
> > > > Sent: Wednesday, December 31, 2003 3:58 AM
> > > > To: Pgsql-General@Postgresql.Org (E-mail)
> > > > Subject: [GENERAL] What does count(*) count?
> > > >
> > > >
> > > > Hi all,
> > > > I tried to dump out a single table and just for a
> > > > verification I counted the number of 'INERT INTO' rows. I
> > > > found that count(*) results less rows than grep.
> > > > *******************
> > > >
> > > > Csaba@compaq ~
> > > > $ pg_dump -d -t t_stockchanges alumil6 > sc.dump
> > > >
> > > > *******************
> > > >
> > > > alumil6=# select count(*) from t_stockchanges ;
> > > >  count
> > > > -------
> > > >   9816
> > > > (1 row)
> > > >
> > > > *******************
> > > >
> > > > Csaba@compaq ~
> > > > $ cat sc.dump | grep 'INSERT INTO' | wc -l
> > > >    4908
> > > >
> > > > *******************
> > > > What can be the reason of it?
> > > >
> > > > Thx,
> > > >
> > > > -- Csaba
> > > >
> > > >
> > > > ---------------------------(end of
> > > > broadcast)---------------------------
> > > > TIP 9: the planner will ignore your desire to choose an index
> > > > scan if your
> > > >       joining column's datatypes do not match
> > > >
> > > -- Incoming mail is certified Virus Free.
> > > Checked by AVG Anti-Virus (http://www.grisoft.com).
> > > Version: 7.0.209 / Virus Database: 261 - Release Date:
> 2003. 12. 26.
> > >
> >
> -- Incoming mail is certified Virus Free.
> Checked by AVG Anti-Virus (http://www.grisoft.com).
> Version: 7.0.209 / Virus Database: 261 - Release Date: 2003. 12. 26.
>


pgsql-general by date:

Previous
From: Martin Marques
Date:
Subject: Re: 'like' refuses to use an index???
Next
From: Tom Lane
Date:
Subject: Re: What does count(*) count?