Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id AAC316332F3 for ; Mon, 29 Mar 2010 10:43:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 82384-02 for ; Mon, 29 Mar 2010 13:43:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by mail.postgresql.org (Postfix) with ESMTP id 27AF66324E2 for ; Mon, 29 Mar 2010 10:43:39 -0300 (ADT) Received: by wwe15 with SMTP id 15so8256738wwe.19 for ; Mon, 29 Mar 2010 06:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type; bh=InzA8vX/TvsmzXGORsNl3u9z4xUoUySnmffwhLh14rA=; b=TuNt899F5z3OZlpJMHDAgXuMTsLuExj4GOUhA8xW44HXPrfOggWwKe8hYoD2YKLh2r 7Pw07maBjkv4/ZHYBMaQZTaUqr0WUHKdjQEsCNrJCc6bkWf/PNFsgIj1wmWfcKmKZXq6 EIWwW/HPRd6Q+p9LEAEP7QadErjWv2Wg+QE+Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=aImQJTPqxNEoBexm8WSl3QsYRgUKjmLmuDtDBplqL9j9sV5vhZ3FF7GlUhagA9nOYv 5kMw4y8X1uWfTVAoW939kHnvXBTGp9/puA76PRL6kmmkWqq3tmvRIVoh5zaXHA/2ozfn 35GHlKl6rtSlaNUBng7VDq6C5/673KJ3pfyBU= MIME-Version: 1.0 Received: by 10.216.165.14 with HTTP; Mon, 29 Mar 2010 06:43:18 -0700 (PDT) In-Reply-To: References: <645d9d71003272351x766707c7sadde9aa77bc1c0d3@mail.gmail.com> <645d9d71003280011q6cf2c6d6p7279605e6e0b4235@mail.gmail.com> <645d9d71003280033l16069edcp45d9bbb0e7ed5517@mail.gmail.com> <22618.1269793661@sss.pgh.pa.us> <4BAF8D1D.2050109@wizmail.org> <24446.1269797854@sss.pgh.pa.us> <645d9d71003282156n5ec025bbgd49283c14ea968b6@mail.gmail.com> From: Nikolas Everett Date: Mon, 29 Mar 2010 09:43:18 -0400 Received: by 10.216.86.131 with SMTP id w3mr3183305wee.156.1269870218269; Mon, 29 Mar 2010 06:43:38 -0700 (PDT) Message-ID: Subject: Re: Optimizer showing wrong rows in plan To: raghavendra t Cc: Matthew Wakeling , Tadipathri Raghu , Tom Lane , Jeremy Harris , pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=0016e6d7787f4553e80482f0b3b6 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.552 tagged_above=-10 required=5 tests=AWL=-0.443, BAYES_05=-1.11, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/369 X-Sequence-Number: 38194 --0016e6d7787f4553e80482f0b3b6 Content-Type: text/plain; charset=ISO-8859-1 See http://www.postgresql.org/docs/current/static/storage-page-layout.html for all of what is taking up the space. Short version: Per block overhead is > 24 bytes Per row overhead is 23 bytes + some alignment loss + the null bitmap if you have nullable columns On Mon, Mar 29, 2010 at 8:24 AM, raghavendra t wrote: > Hi Mattew, > > Thank you for the information. > > Once again, I like to thank each and everyone in this thread for there > ultimate support. > > Regards > Raghavendra > > On Mon, Mar 29, 2010 at 4:47 PM, Matthew Wakeling wrote: > >> On Mon, 29 Mar 2010, Tadipathri Raghu wrote: >> >>> As per the documentation, one page is 8kb, when i create a table with int >>> as >>> one column its 4 bytes. If i insert 2000 rows, it should be in one page >>> only >>> as its 8kb, but its extending vastly as expected. Example shown below, >>> taking the previous example table test with one column. >>> >> >> There is more to a row than just the single int column. The space used by >> a column will include a column start marker (data length), transaction ids, >> hint bits, an oid, a description of the types of the columns, and finally >> your data columns. That takes a bit more space. >> >> Matthew >> >> -- >> If you let your happiness depend upon how somebody else feels about you, >> now you have to control how somebody else feels about you. -- Abraham >> Hicks >> >> -- >> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org >> ) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-performance >> > > --0016e6d7787f4553e80482f0b3b6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Se= e=A0http://www.postgresql.org/docs/current/static/storage-page-layo= ut.html=A0for all of what is taking up the space. =A0Short version:=A0<= div> =A0Per block overhead is > 24 bytes
=A0Per row overhead is 23 = bytes + some alignment loss + the null bitmap if you have nullable columns<= /div>

On Mon, Mar 29, 2010 at 8:24 AM, r= aghavendra t <raagavendra.rao@gmail.com> wrote:
Hi Mattew,
=A0
Thank you for the information.
=A0
Once again, I like to thank each and everyone in this thread for there= ultimate support.
=A0
Regards
Raghavendra

On Mon, Mar 29, 2010 at 4:47 PM, Matthew Wakelin= g <matthew@flymine.org> wrote:
On Mon, 29 Mar 2010, Tadipathri Raghu= wrote:
As per the documentation, one page is= 8kb, when i create a table with int as
one column its 4 bytes. If i ins= ert 2000 rows, it should be in one page only
as its 8kb, but its extending vastly as expected. Example shown below,
t= aking the previous example table test with one column.

= There is more to a row than just the single int column. The space used by a= column will include a column start marker (data length), transaction ids, = hint bits, an oid, a description of the types of the columns, and finally y= our data columns. That takes a bit more space.

Matthew

--
If you let your happiness depend upon how somebod= y else feels about you,
now you have to control how somebody else feels = about you. -- Abraham Hicks

--
Sent via = pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/= mailpref/pgsql-performance


--0016e6d7787f4553e80482f0b3b6--