Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Maximun number of unions in a single query
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.
-- BillyReceived on Thu Jun 09 2005 - 14:20:38 CDT