From: | "alexandre paes :: aldeia digital" <alepaes(at)aldeiadigital(dot)com(dot)br> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | LIMIT Optimization |
Date: | 2002-01-25 15:59:11 |
Message-ID: | 004601c1a5b9$3b344a60$fc01a8c0@aldeiadigital.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2002-01-25 16:16:34 | Re: linking from SQL Server |
Previous Message | SHELTON,MICHAEL (Non-HP-Boise,ex1) | 2002-01-25 15:12:01 | Re: linking from SQL Server |