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: Maximun number of unions in a single query

Re: Maximun number of unions in a single query

From: Billy <vslabs_at_onwe.co.za>
Date: 9 Jun 2005 12:20:38 -0700
Message-ID: <1118344838.927408.78090@g14g2000cwa.googlegroups.com>


Andreas Sheriff wrote:

> Yeah, you were right,

Cheap shot, pretending I'm write, trying to weasle out of buying the next round.. not going work!

> --------------------------------------------------------------------
> | Id | Operation | Name | Rows | Bytes | Cost |
> --------------------------------------------------------------------
> | 0 | INSERT STATEMENT | | 4 | | 8 |
versus:
> --------------------------------------------------------------------
> | 0 | INSERT STATEMENT | | 1 | 39 | 2 |
> --------------------------------------------------------------------

What you're missing in this analysis that if the 2nd INSERT statement does a single row only and if run more 4 times (4 rows) the total cost will the same as the 1st INSERT statement (which already does 4 rows). Add to that the parsing overheads (which I believe is not factored into the CBO cost), and the 1st INSERT scales better than the 2nd.

Horrible, but true it seems. Also shows that despite how poor the client integrates with Oracle, it can still be hacked to perform.

--
Billy
Received on Thu Jun 09 2005 - 14:20:38 CDT

Original text of this message

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