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

Re: Looking for tips

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Crosby <ryusei(at)gmail(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Looking for tips
Date: 2005-07-19 19:01:00
Message-ID: 8446.1121799660@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Oliver Crosby <ryusei(at)gmail(dot)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

In response to

Responses

pgsql-performance by date

Next:From: PFCDate: 2005-07-19 19:05:27
Subject: Re: Impact of checkpoint_segments under continual load conditions
Previous:From: Kevin GrittnerDate: 2005-07-19 18:58:20
Subject: Re: Looking for tips

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