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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

From: <hasta_l3_at_hotmail.com>
Date: 26 Apr 2007 23:20:35 -0700
Message-ID: <1177654835.523400.65770@b40g2000prd.googlegroups.com>


On 26 avr, 06:03, DA Morgan <damor..._at_psoug.org> wrote:
> Galen Boyer wrote:
> > On Mon, 23 Apr 2007, damor..._at_psoug.org wrote:
>
> >> I thinkOracleis remarkably easy to use given its power.
>
> > And so do I. We are talking about a particular feature of theOracle
> > engine. Not the entire engine. The sequence is not as easy to
> > implement than an autoincremeting datatype, plain and simple.
>
> What I am saying that simple does not trump functional.
>

Daniel, I agree that faster *often* means more complex. It is not always so, however.

For a counter-example, consider a many-rows insert SQL statement, which we all know is *damn* faster than an equivalent PL/SQL loop, yet is simpler in many respects.

In the case of IDENTITY columns, it is hard to see why they would be slower than sequences.

If anything, I would expect them to be marginally faster than assigning a sequence with a trigger, and on par with specification in an insert.

> Array processing with BULK COLLECT and FORALL is more complicated
> than cursor loops. But it will be a cold day in heck before you see
> me implementing cursor loops again.

Again, I sympathize with this view.

But dont forget that performance is not the only constraint. Development effort and maintainability are other that come to mind. I wouldn't mind a cursor loop in a rarely executed procedure if it is fast enough.

In fine, the good engineer must find a solution that fulfills the requirements at the minimum cost (over the whole lifetime of the product)

Received on Fri Apr 27 2007 - 01:20:35 CDT

Original text of this message

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