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

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

From: Ed Stevens <spamdump_at_nospam.noway.nohow>
Date: Sat, 26 Oct 2002 15:25:15 GMT
Message-ID: <3dbab303.4564573@ausnews.austin.ibm.com>


On 24 Oct 2002 21:29:11 -0700, komsiikomsaa_at_yahoo.com (Eino Komsi) wrote:

>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

What's the difference between a duck?

Who in their right mind would even *consider* a separate SELECT statement for separate columns of a given row? Andy's right, if that were 'preferred' Oracle technique, Oracle would have never made it out of the starting gate, and Larry Ellison would be lucky to be able to afford a 15-foot jon boat.

--
Ed Stevens
(Opinions expressed do not necessarily represent those of my employer.)
Received on Sat Oct 26 2002 - 10:25:15 CDT

Original text of this message

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