Re: Performance pb vs SQLServer.

Поиск
Список
Период
Сортировка
От Steinar H. Gunderson
Тема Re: Performance pb vs SQLServer.
Дата
Msg-id 20050815013741.GA32106@uio.no
обсуждение исходный текст
Ответ на Re: Performance pb vs SQLServer.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On Sun, Aug 14, 2005 at 09:18:45PM -0400, Tom Lane wrote:
> Not really.  There's been some speculation about implementing index
> "skip search" --- once you've verified there's at least one visible
> row of a given index value, tell the index to skip to the next different
> value instead of handing back any of the remaining entries of the
> current value.  But it'd be a lot of work and AFAICS not useful for
> very many kinds of queries besides this.

This is probably a completely wrong way of handling it all, but could it be
done in a PL/PgSQL query like this? (Pseudo-code, sort of; I'm not very well
versed in the actual syntax, but I'd guess you get the idea.)

x = ( SELECT foo FROM table ORDER BY foo LIMIT 1 );
WHILE x IS NOT NULL
  RETURN NEXT x;
  x = ( SELECT foo FROM table WHERE foo > x ORDER BY foo LIMIT 1 );
END;

(Replace with max() and min() for 8.1, of course.)

/* Steinar */
- fond of horrible hacks :-)
--
Homepage: http://www.sesse.net/

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Performance pb vs SQLServer.
Следующее
От: dario_d_s@unitech.com.ar
Дата:
Сообщение: Re: Performance pb vs SQLServer.