Re: is it possible to make this faster? - Mailing list pgsql-performance

From Tom Lane
Subject Re: is it possible to make this faster?
Date
Msg-id 16779.1148596234@sss.pgh.pa.us
Whole thread Raw
In response to Re: is it possible to make this faster?  (Jim Nasby <jnasby@pervasive.com>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Jim Nasby
Date:
Subject: Re: is it possible to make this faster?
Next
From: Mark Kirkwood
Date:
Subject: Re: Optimizing a huge_table/tiny_table join