pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim Nasby <jnasby@pervasive.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: is it possible to make this faster?
Date: Thu, 25 May 2006 18:30:34 -0400
Message-ID: <16779.1148596234@sss.pgh.pa.us> (raw)
In-Reply-To: <346F1F9F-10E6-43F7-80E4-0DE989E5D760@pervasive.com>
References: <b42b73150605251307id0e7998td4a3693f0d456f88@mail.gmail.com>
	<15919.1148590347@sss.pgh.pa.us>
	<16119.1148591497@sss.pgh.pa.us>
	<346F1F9F-10E6-43F7-80E4-0DE989E5D760@pervasive.com>

Jim Nasby <jnasby@pervasive.com> writes:
> On May 25, 2006, at 4:11 PM, Tom Lane wrote:
>> Are you sure you measured that right?  I tried to duplicate this using
>> mysql 5.0.21, and I see runtimes of 0.45 sec without an index and
>> 0.15 sec with.  This compares to psql times around 0.175 sec.  Doesn't
>> look to me like we're hurting all that badly, even without using the
>> index.

> Well, that would depend greatly on how wide the rows were, and I  
> don't believe the OP ever mentioned that. If he's got a nice, fat  
> varchar(1024) in that table, then it's not surprising that an index  
> would help things.

Wide rows might slow down the psql side of things somewhat (though
probably not as much as you think).  That doesn't account for the
discrepancy in our mysql results though.

For the record, I was testing with a table like
	create table t(a int, b int, c int);
	create index ti on t(a,b,c);

			regards, tom lane



view thread (25+ messages)  latest in thread

Message-ID: <16779.1148596234@sss.pgh.pa.us>
Permalink:  ../16779.1148596234@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16779.1148596234@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, jnasby@pervasive.com, mmoncure@gmail.com
  Subject: Re: is it possible to make this faster?
  In-Reply-To: <16779.1148596234@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