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

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: (view raw, whole thread or download thread mbox)
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

pgsql-performance by date

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

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