Re: is it possible to make this faster?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: is it possible to make this faster?
Дата
Msg-id 16779.1148596234@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: is it possible to make this faster?  (Jim Nasby <jnasby@pervasive.com>)
Список 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 по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: is it possible to make this faster?
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: Optimizing a huge_table/tiny_table join