Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> CURSORS : SELECT * VERSUS SELECT only necessary columns

CURSORS : SELECT * VERSUS SELECT only necessary columns

From: Jan <janik_at_pobox.sk>
Date: 6 Dec 2001 07:45:59 -0800
Message-ID: <81511301.0112060745.6ba7a032@posting.google.com>


I wanto to tune my procedures. I have many independent procedures, which check data in one table with many rows. E.g. the 1-st proceure needs COL_1 and COL_2, 2-nd COL_1 and COL_3, 3-rd COL_1 and COL_5 etc. from 1 row.
Sometimes all procedures are executed, sometimes only few of them - it depends on the values in that rows.

Question:

What is better - If I use in cursors

1> SELECT * FROM table WHERE id=p_id..

    and it will be in SQL Cache as 1 SQL statment, but every times many unnecessary columns will be selected

or

2> SELECT what I exactly need FROM table WHERE id=p_id..

   but almost each procedure will have different SELECT

Thank you,

Jan Received on Thu Dec 06 2001 - 09:45:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US