Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> "select *" MUCH quicker than "select <field> from...": explanation ?
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
Received on Tue Jul 06 2004 - 13:25:13 CDT