Skip site navigation (1) Skip section navigation (2)

Re: performance issue in the fields.

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: dba <dbadbb(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: performance issue in the fields.
Date: 2011-02-23 19:59:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Mon, Feb 14, 2011 at 5:36 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> Hello
> 2011/2/14 dba <dbadbb(at)gmail(dot)com>:
>> create table a( address1 int,address2 int,address3 int)
>> create table b(address int[3])
>> I have created two tables. In the first table i am using many fields to
>> store 3 address.
>> as well as in b table, i am using array data type to store 3 address.  is
>> there any issue would face in performance related things.... which one will
>> cause the performance issue.
> yes, there is. Planner can not to work well with foreign keys stored in array.

also the array variant is going to be bigger on disk. This is because
as fields, all the important info about the fields is stored in the
table header (inside the system catalogs).  But with the array,
various header information specific to the array has to be stored with
each row.  This is largely due to some questionable design decisions
made in early array implementation that we are stuck with :-).


In response to


pgsql-performance by date

Next:From: Greg SmithDate: 2011-02-23 21:17:16
Subject: Re: Unused indices
Previous:From: Merlin MoncureDate: 2011-02-23 19:48:03
Subject: Re: NULLS LAST performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group