Which is faster?
Darren Reely
darren.reely at latticesemi.com
Tue Apr 4 13:25:42 CDT 2006
I'm surprised I haven't seen it mentioned yet. When you can, use CHOOSE
instead. It pushes the decision into the actual Oracle query that is
generated. Something you would likely do if you were writing a cursor.
fernando.olmos at hpa.com.au wrote:
>
> I have a table (X) which has over 200 thousand records and is linked
> to another table (Y) as one-to-one.
>
> I need to select certain records from the entire complex, and I was
> wondering which one of these would do it faster?
>
> [1] access table_x link order_no to order_no of table_y
> select if field1 of table_x = 1234
>
> of is this faster?
>
> [2] access table_x link order_no to order_no of table_y
> select table_x if field1 of table_x = 1234
>
> I figured that either way is the same, but I've timed the 2nd option
> and it's remarkably faster. Is this because PH is actually filtering
> out the records in the query, at the table level, if you say "select
> table if", as opposed to waiting for the entire record complex and
> then applying the filter?
>
> Thanks guys
>
> /Fernando Olmos/
> *MIS*
> *Senior Analyst Programmer*
>
> *HPA***
> Direct: 03 9217 5411
> Mobile: 0410 382 857
> Fax: 03 9217 5716
>
> _*www.hpa.com.au*_
> <file:///H:/Appdata/Microsoft/Signatures/www.hpa.com.au>
>
>
> **********************************************************************
> IMPORTANT
> The contents of this e-mail and its attachments are confidential and intended
> solely for the use of the individual or entity to whom they are addressed. If
> you received this e-mail in error, please notify the HPA Postmaster, postmaster at hpa.com.au,
> then delete the e-mail.
> This footnote also confirms that this e-mail message has been swept for the
> presence of computer viruses by Ironport. Before opening or using any
> attachments, check them for viruses and defects.
> Our liability is limited to resupplying any affected attachments.
> HPA collects personal information to provide and market our services. For more
> information about use, disclosure and access see our Privacy Policy at
> www.hpa.com.au
> **********************************************************************
>
More information about the powerh-l
mailing list