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)
Список: pgsql-performance

Скрыть дерево обсуждения

Performance pb vs SQLServer.  (Stéphane COEZ, )
 Re: Performance pb vs SQLServer.  (John Arbash Meinel, )
  Re: Performance pb vs SQLServer.  ("Steinar H. Gunderson", )
   Re: Performance pb vs SQLServer.  (John Arbash Meinel, )
   Re: Performance pb vs SQLServer.  (Tom Lane, )
    Re: Performance pb vs SQLServer.  ("Steinar H. Gunderson", )
  Re: Performance pb vs SQLServer.  ("Steinar H. Gunderson", )
  Re: Performance pb vs SQLServer.  (Stéphane COEZ, )
 Re: Performance pb vs SQLServer.  (, )
  Re: Performance pb vs SQLServer.  (Stéphane COEZ, )
 Re: Performance pb vs SQLServer.  ("Magnus Hagander", )
  Re: Performance pb vs SQLServer.  (Stéphane COEZ, )
 Re: Performance pb vs SQLServer.  ("Magnus Hagander", )
  Re: Performance pb vs SQLServer.  (Alvaro Herrera <-ip.org>, )
  Re: Performance pb vs SQLServer.  ("Qingqing Zhou", )
   Re: Performance pb vs SQLServer.  (John A Meinel, )

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 по дате сообщения:

От: "Petr Kavan"
Дата:
Сообщение: Re: How many views is ok?
От: "Magnus Hagander"
Дата:
Сообщение: Re: Performance pb vs SQLServer.