Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1
Дата
Msg-id 407d949e0907150137n2f2bc66eq70cd6627217fea1@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1  (ning <mailxiening@gmail.com>)
Список pgsql-performance
On Wed, Jul 15, 2009 at 9:27 AM, Craig
Ringer<craig@postnewspapers.com.au> wrote:
> On Wed, 2009-07-15 at 12:10 +0900, ning wrote:
>
>> First execution: PostgreSQL 0.006277 seconds / DB2 0.009028 seconds
>> Second execution: PostgreSQL 0.005932 seconds / DB2 0.000332 seconds
>
> Actually, on second thoughts that looks a lot like DB2 is caching the
> query results and is just returning the cached results when you repeat
> the query.


Yeah, is 6ms really a problematic response time for your system?

If so you might consider whether executing millions of small queries
is really the best approach instead of absorbing them all into queries
which operate on more records at a time. For example, it's a lot
faster to join two large tables than look up matches for every record
one by one in separate queries.

There's no question if you match up results from DB2 and Postgres one
to one there will be cases where DB2 is faster and hopefully cases
where Postgres is faster. It's only interesting if the differences
could cause problems, otherwise you'll be running around in circles
hunting down every difference between two fundamentally different
products.

--
greg
http://mit.edu/~gsstark/resume.pdf

В списке pgsql-performance по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1
Следующее
От: ning
Дата:
Сообщение: Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1