Hi,
I would like to ask for some advice on the design of PL/SQL procedure. I am
trying to improve the performance of a PL/SQL procedure which allows a user
to do search by their last name and returns their account information. I
will be joining two tables, customer_info (with last name as a column ) and
account_details, with 8 million and 50 million rows respectively by user ID
on each table. The procedure is already in place and very straight forward,
which goes something like the following:
procedure name_search ( p_in_user_id number, p_in_lastname varchar2 ,,,)
{
.......
open cursor for
select a.column1, a.column2, b.column1, b.column2, .....
from customer_info a, account_details b
where a.user_id = b.user_id
and a.last_name like p_in_lastname || '%';
}
The execution time varies from 3 to 15 seconds.
I would like to ask if there are other ways to write the procedure, such as
using with clause or global temporary tables which can significantly
improve performance in your experience.
The tables already have partition and indexes on last_names, user_id in
place.
Thanks in advance.
Nick
--
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
---
You received this message because you are subscribed to the Google Groups
"Oracle PL/SQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.