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 -> What's the performance difference: 1 SELECT vs 5 SELECTS

What's the performance difference: 1 SELECT vs 5 SELECTS

From: Eino Komsi <komsiikomsaa_at_yahoo.com>
Date: 24 Oct 2002 21:29:11 -0700
Message-ID: <10b3c267.0210242029.5d3ed40f@posting.google.com>


hi,

I have the following table:

CREATE TABLE SOME_TABLE (
  ID NUMBER(10) PRIMARY KEY NOT NULL,

  BIG1 VARCHAR(2000),
  BIG2 VARCHAR(2000),
  BIG3 VARCHAR(2000),
  BIG4 VARCHAR(2000),
  BIG5 VARCHAR(2000)

);

Now, I perform:
a) one SELECT like: SELECT * FROM SOME_TABLE WHERE ID = 1234; versus

b) five SELECTs like: SELECT BIG1 FROM SOME_TABLE WHERE ID = 1234;
                      SELECT BIG2 FROM SOME_TABLE WHERE ID = 1234;
                      SELECT BIG3 FROM SOME_TABLE WHERE ID = 1234;
                      SELECT BIG4 FROM SOME_TABLE WHERE ID = 1234;
                      SELECT BIG5 FROM SOME_TABLE WHERE ID = 1234;

questions I'd like to know:
1. What is the performance diffence between a and b? 2. What is the CPU usage on the server in a compared to b ?

a and b have different transactions, one for both. I.e. all the five selects are in the same transaction. The table contains like 50000 rows.

regards, EK Received on Thu Oct 24 2002 - 23:29:11 CDT

Original text of this message

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