Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: "select *" MUCH quicker than "select <field> from...": explanation ?
On 6 Jul 2004 11:25:13 -0700, spendius_at_muchomail.com (Spendius) wrote:
>hi,
>I've noticed, as I was trying to tune a query that performs
>a SELECT on a single field in a view, that if I replace this
>call to a single field by a '*' or the list of other/all fields
>existing in this view I get a quicker answer in SQL*Plus. The
>statement is very simple and looks like
>> SELECT fhc_id
>> FROM <view>
>> WHERE oiu_id = 32
>If I replace 'fhc_id' by several or all columns of the views the
>return is immediate (it takes about a second when only the 'fhc_id'
>column is selected). On the other hand the definition of the view
>is rather complex, and it behaves exactly the same if I perform
>the query directly as it is defined in the view.
>Any idea/enlightenment about what makes Oracle respond really
>quicker when you select several columns rather than one only ?
>Thanks.
>Spendius
Did you
- compare the execution paths and/or ran EXPLAIN PLAN?
- traced the session ?
-- Sybrand Bakker, Senior Oracle DBAReceived on Tue Jul 06 2004 - 15:24:00 CDT