Re: How to estimate size of a row and therefore how much progress this query has made

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to estimate size of a row and therefore how much progress this query has made
Date: 2003-02-02 05:25:15
Message-ID: 873cn7s18k.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Thanks a lot for your help.

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> > The last two columns are actually being populated with nulls. The first three
> > columns are being populated with data. The string in the first column is
> > actually always 12 characters.
>
> Okay, so 4+12+4+4 data bytes, plus header overhead --- is this 7.3 or
> something older? Let's assume older --- 24+32+4 bytes per row, plus
> the null bitmap and alignment padding; say 64 bytes per row.

It's 7.3

> > So far it's inserted quite a bit of data: [8.5 Gig]
>
> > I think it'll insert a total of 107,535,604 records.
>
> Should be finishing pretty darn soon; in fact, I'd venture you already
> had a good bit of data in the table. You don't have much over 6 gig
> accounted for here.

Nope, the table was empty previously. I created it just before the insert.

Hm, I guess I have a bit of a puzzle.

Do OIDs consume space too? This is a INSERT INTO foo () (select ..) style
query so the records get OIDs no? I probably should get in the habit of
creating all my tables without OIDs since I don't use them. I haven't thought
about them previously.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-02-02 05:33:42 Re: How to estimate size of a row and therefore how much progress this query has made
Previous Message will trillich 2003-02-02 05:07:06 Re: History