Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D879C2E0070 for ; Sat, 22 Mar 2008 06:08:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 25236-04 for ; Sat, 22 Mar 2008 06:08:26 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ag-out-0708.google.com (ag-out-0708.google.com [72.14.246.240]) by postgresql.org (Postfix) with ESMTP id 46DD32E0060 for ; Sat, 22 Mar 2008 06:08:26 -0300 (ADT) Received: by ag-out-0708.google.com with SMTP id 23so3574059agd.5 for ; Sat, 22 Mar 2008 02:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=UkniA9RlLRAkDDbe9p/9FoFCa/+RT4WfsEGY3TDqTbU=; b=imgs9aF8Up4fy6ezgWsnh9+xyuY44hrAX+VTUy8P6JIhRotqeAgW37qYr+JA4CX51nQE7avIkfQgsJKDCq9jyLmOMJ/XovO9qstWqcN1mTuIW5TXV4W7yvnk3FOQEGWdWO03eSxly3yaZ7NJdI4Vgho/bHbacNevz7oQOWY8Ofk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=f5wl649No2+WqGLpDmXAl1QYVqdZ9HICCwPOfqZ4ucvpSlS3fxe2detjX9Sh5y7TugLFIJQzB8dkMjoEctsJe1pIrTeX2APn3cIR2BF9R/fRHQ8mzTLUlPRdukH7ctmu9oqn9wmGL0KhEETRJJCfC8HsseotaCj1EhDmahuop/4= Received: by 10.100.255.17 with SMTP id c17mr11522734ani.37.1206176905049; Sat, 22 Mar 2008 02:08:25 -0700 (PDT) Received: by 10.100.105.20 with HTTP; Sat, 22 Mar 2008 02:08:25 -0700 (PDT) Message-ID: Date: Sat, 22 Mar 2008 14:38:25 +0530 From: "sathiya psql" To: "Craig Ringer" Subject: Re: Having MANY MANY empty columns in database Cc: pgsql-performance@postgresql.org In-Reply-To: <47E4C231.20302@postnewspapers.com.au> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7207_25206228.1206176905047" References: <47E4C231.20302@postnewspapers.com.au> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200803/428 X-Sequence-Number: 29382 ------=_Part_7207_25206228.1206176905047 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > > OK, so your tables all have the same fields (columns), as if you used > CREATE TABLE new_table ( LIKE some_template_table ) ? It will contain some other unique columns for each table. > meaning that they contain NULL values in that field for every record? what is the value it may contain i don't know ?? we are not filling any value !! > > > If you drop those columns we will gain any performance or not..... > I need to test... HOW to test the overall performance of database.. > However, I recall hearing that PostgreSQL keeps a null bitmap and doesn't > use any storage for null fields. If that is correct then you probably won't > be paying much of a price in disk I/O, but there might still be other costs. > if it is sure that it will not make disk I/O then it is ok > > I can't help wondering why you have all those useless columns in the > first place, and why you have so many identically structured tables. > these are not useless columns... it should be used to update the owner of the record, updated time, created and other stuffs, but nobody is using now. > > -- > Craig Ringer > ------=_Part_7207_25206228.1206176905047 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
OK, so your tables all have the same fields (columns), as if you used
CREATE TABLE new_table ( LIKE some_template_table ) ?

It will contain some other unique columns for each table.
meaning that they contain NULL values in that field for every record?
 
what is the  value it may contain i don't know ?? we are not filling any value !!

> If you drop those columns we will gain any performance or not.....
 I need to test... HOW to test the overall performance of database..
However, I recall hearing that PostgreSQL keeps a null bitmap and doesn't use any storage for null fields. If that is correct then you probably won't be paying much of a price in disk I/O, but there might still be other costs.
if it is sure that it will not make disk I/O then it is ok

I can't help wondering why you have all those useless columns in the
first place, and why you have so many identically structured tables.
these are not useless columns... it should be used to update the owner of the record, updated time, created and other stuffs, but nobody is using now.

--
Craig Ringer

------=_Part_7207_25206228.1206176905047--