On Aug 24, 5:08 am, Santana <paulito.sant...@gmail.com> wrote:
> Hi friends.
> i have a PL/SQL fucntion that return some records about customers, and
> the problem is :
>
> I need help trying to optimize a query that is used for paging of an
> aspx application.
>
> The ideia of this query is return a set of records and this records
> must by orderder by the customer name :
>
> SELECT ID, DESCRIPTION
> FROM (SELECT a.*, ROWNUM RNUM
> FROM (SELECT CUSTOMER_ID ID, FIRST_NAME DESCRIPTION
> FROM CUSTOMERS cust
> WHERE cust.TYPE='G'
> AND cust.END_DATE IS NULL
> ORDER BY UPPER(FIRST_NAME)
> ) a
> WHERE ROWNUM <= 210 --<input parameter : if we want to get
> customers between position 200 and 210(according to the alphabetical
> ordering of customers), then we should put here the value 210>
> )
> WHERE RNUM >= 200 210 --<input parameter : if we want to get customers
> between position 200 and 210(according to the alphabetical ordering of
> customers), then we should put here the value 200>
>
> This query is very slow and need some improvements. Can you give me
> idea ? Any trick ?
>
> Regards,
> Santana
Without the query plan, a table definition (including any indexes),
and Oracle version (at the very least) no one can tell you much of
anything useful or usable.
David Fitzjarrell
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---