From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Crosby <ryusei@gmail.com>
Cc: Joshua D. Drake <jd@commandprompt.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Looking for tips
Date: Tue, 19 Jul 2005 15:01:00 -0400
Message-ID: <8446.1121799660@sss.pgh.pa.us> (raw)
In-Reply-To: <1efd553a050719112126b8d981@mail.gmail.com>
References: <1efd553a05071910427b290203@mail.gmail.com>
<42DD3D55.9020508@commandprompt.com>
<1efd553a050719112126b8d981@mail.gmail.com>
Oliver Crosby <ryusei@gmail.com> writes:
> The queries are all simple insert or select statements on single tables.
> Eg. select x from table where y=?; or insert into table (a, b, c)
> values (?, ?, ?);
> In the case of selects where it's a large table, there's an index on
> the column being searched, so in terms of the example above, x is
> either a pkey column or other related field, and y is a non-pkey
> column.
If you're running only a single query at a time (no multiple clients),
then this is pretty much the definition of a MySQL-friendly workload;
I'd have to say we are doing really well if we are only 50% slower.
Postgres doesn't have any performance advantages until you get into
complex queries or a significant amount of concurrency.
You could possibly get some improvement if you can re-use prepared plans
for the queries; but this will require some fooling with the client code
(I'm not sure if DBD::Pg even has support for it at all).
regards, tom lane
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: tgl@sss.pgh.pa.us, ryusei@gmail.com, jd@commandprompt.com
Subject: Re: Looking for tips
In-Reply-To: <8446.1121799660@sss.pgh.pa.us>
* 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