From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: 7.3.1 New install, large queries are slow
Date: Thu, 16 Jan 2003 08:17:38 -0500
Message-ID: <20030116081738.B22344@mail.libertyrms.com> (raw)
In-Reply-To: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BFD@pos_pdc.posportal.com>
References: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BFD@pos_pdc.posportal.com>
On Wed, Jan 15, 2003 at 03:30:55PM -0800, Roman Fail wrote:
> Thanks to everyone for the quick replies! I'm sure that my lack of skill with SQL queries is the main problem. What's strange to me is how MSSQL takes my bad queries and makes them look good anyway. It must have a real smart planner.
> Andrew Sullivan wrote:
> >First, the performance of foreign keys is flat-out awful in Postgres.
> >I suggest avoiding them if you can.
>
> I don't have any problem getting rid of FKs, especially if it might
> actually help performance. The nightly data import is well-defined
Sorry, I think I sent this too quickly. FKs make no difference to
SELECT performance, so if you're not doing updates and the like at
the same time as the SELECTs, there's no advantage. So you should
leave the FKs in place.
> I think this is the most likely problem. I've read through Chapter
> 10 of the 7.3 docs, but I still don't feel like I know what would
> be a good order. How do you learn this stuff anyway? Trial and
> error?
Sorry, but yes.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: 7.3.1 New install, large queries are slow
In-Reply-To: <20030116081738.B22344@mail.libertyrms.com>
References: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BFD@pos_pdc.posportal.com> <20030116081738.B22344@mail.libertyrms.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