From: | Együd Csaba <csegyud(at)vnet(dot)hu> |
---|---|
To: | 'Reid Thompson' <Reid(dot)Thompson(at)ateb(dot)com>, "Pgsql-General(at)Postgresql(dot)Org (E-mail)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: What does count(*) count? |
Date: | 2003-12-31 16:19:04 |
Message-ID: | 002101c3cfb9$cfc41760$230a0a0a@compaq |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)Thompson(at)ateb(dot)com]
> Sent: 2003. december 31. 15:26
> To: csegyud(at)vnet(dot)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(at)vnet(dot)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(dot)Thompson(at)ateb(dot)com]
> > > Sent: 2003. december 31. 13:46
> > > To: csegyud(at)vnet(dot)hu
> > > Subject: RE: [GENERAL] What does count(*) count?
> > >
> > >
> > > vi sc.dump and see.
> > >
> > > reid
> > >
> > >
> > > > -----Original Message-----
> > > > From: Együd Csaba [mailto:csegyud(at)vnet(dot)hu]
> > > > Sent: Wednesday, December 31, 2003 3:58 AM
> > > > To: Pgsql-General(at)Postgresql(dot)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(at)compaq ~
> > > > $ pg_dump -d -t t_stockchanges alumil6 > sc.dump
> > > >
> > > > *******************
> > > >
> > > > alumil6=# select count(*) from t_stockchanges ;
> > > > count
> > > > -------
> > > > 9816
> > > > (1 row)
> > > >
> > > > *******************
> > > >
> > > > Csaba(at)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.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-31 16:26:37 | Re: What does count(*) count? |
Previous Message | Tom Lane | 2003-12-31 16:16:48 | Re: Is my MySQL Gaining ? |