pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@mail.com>
To: AI Rumman <rummandba@gmail.com>
Cc: Claudio Freire <klaussfreire@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Evgeny Shishkin <itparanoia@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Why does the number of rows are different in actual and estimated.
Date: Fri, 14 Dec 2012 17:47:39 -0500
Message-ID: <20121214224739.80090@gmx.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
AI Rumman wrote:
> The ENTITY table has 2164493 rows with data as follows:
>
> type | count
> -----------------------+--------
> Contacts | 327352
> Candidate | 34668
> Emailst | 33604
> Calendar | 493956
> Contacts Image | 7
> PriceBooks | 2
> Notes Attachment | 17
> SalesOrder | 6
> Acc | 306832
> ...
> ..
> (29 rows)
>
> Do you think partitioning will improve the overall performance of
> the application where all the queries have join with this table?
I would not consider putting contacts, calendars, and sales orders
in separate tables as "partitioning". It is normalizing. That will
be useful if you happen to discover, for instance, that the data
elements needed or relationships to other types of data for a
calendar don't exactly match those for a contact image or a sales
order.
And yes, I would expect that using separate tables for
fundamentally different types of data would improve performance. If
some of these objects (like contacts and candidates) have common
elements, you might want to either have both inherit from a common
Person table, or (usually better, IMO) have both reference rows in
a Person table. The latter is especially important if a contact can
be a candidate and you want to be able to associate them.
-Kevin
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
view thread (20+ messages)
Message-ID: <20121214224739.80090@gmx.com> Permalink: ../20121214224739.80090@gmx.com/ Also on: postgresql.org/message-id/20121214224739.80090@gmx.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-performance@postgresql.org Cc: kgrittn@mail.com, rummandba@gmail.com, klaussfreire@gmail.com, tgl@sss.pgh.pa.us, itparanoia@gmail.com, andrew@dunslane.net Subject: Re: Why does the number of rows are different in actual and estimated. In-Reply-To: <20121214224739.80090@gmx.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox