Re: is it possible to make this faster?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <jnasby(at)pervasive(dot)com>
Cc: "Merlin Moncure" <mmoncure(at)gmail(dot)com>, "Postgresql Performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: is it possible to make this faster?
Date: 2006-05-25 22:30:34
Message-ID: 16779.1148596234@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jim Nasby <jnasby(at)pervasive(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2006-05-25 23:27:09 Re: Optimizing a huge_table/tiny_table join
Previous Message Jim Nasby 2006-05-25 22:17:43 Re: is it possible to make this faster?