Re: Looking for tips - Mailing list pgsql-performance

From Tom Lane
Subject Re: Looking for tips
Date
Msg-id 8446.1121799660@sss.pgh.pa.us
Whole thread Raw
In response to Re: Looking for tips  (Oliver Crosby <ryusei@gmail.com>)
Responses Re: Looking for tips
Re: Looking for tips
Re: Looking for tips
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Looking for tips
Next
From: PFC
Date:
Subject: Re: Impact of checkpoint_segments under continual load conditions