LIMIT Optimization

Поиск
Список
Период
Сортировка
От alexandre paes :: aldeia digital
Тема LIMIT Optimization
Дата
Msg-id 004601c1a5b9$3b344a60$fc01a8c0@aldeiadigital.com.br
обсуждение исходный текст
Ответы Re: LIMIT Optimization
Список pgsql-sql
Hi,

DB2, Sql Server and Oracle have a smart optimization sql-clause (DB2
example):

SELECT * FROM <table> WHERE <cond> ORDER BY <order> OPTMIZATION FOR n ROWS

The [OPTMIZATION FOR] clause turns the query fast by optimize the first "n"
rows.
If the query returns more than "n" rows, the query is slowest if compared
with a normal
query, but it does not have the limitation of PostgreSQL's LIMIT clause.

I think that clause performs the search twice: one for optimize and other if
the # of rows
is great then "n".

It's possible to include this in future releases of PostgreSQL ????


Thanks all!   // ...do not attemp to my harmless english... :)



Alexandre Arruda Paes



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