Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sorting problems oracle 9i
Vaishnavi wrote:
> In my opinion,
>
> What ever query you write, you have to scan the entire table. I can
> see 3 possible solutions here.
>
> 1. If the table is less write intesive and more read intesive, alter
> this table as Index organized.
> or
> 2. Create an Index on price field
> or
> 3. Maintain a separate small table with three rows (top three prices)
> and write a trigger to update this table on Insert / update / delete
> from the original table.
>
> Bechmark these solutions and decide which one suits you best.
> Regards
> Vaishnavi
Might be a good application for a materialized view. Query rewrite would hit the MV rather than the table.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Wed Dec 29 2004 - 17:13:36 CST