Return-Path: <oracle-l-bounce@freelists.org>
Received: from air189.startdedicated.com (root@localhost)
 by orafaq.com (8.11.6/8.11.6) with ESMTP id i1IBtx601796
 for <oracle-l@orafaq.com>; Wed, 18 Feb 2004 05:55:59 -0600
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i1IBtxo01791
 for <oracle-l@orafaq.com>; Wed, 18 Feb 2004 05:55:59 -0600
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id 040AF394D26; Wed, 18 Feb 2004 06:58:31 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 18 Feb 2004 06:57:16 -0500 (EST)
X-Original-To: oracle-l@freelists.org
Delivered-To: oracle-l@freelists.org
Received: from MXR-3.estpak.ee (ld1.estpak.ee [194.126.101.98])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id EEF30394CDC
 for <oracle-l@freelists.org>; Wed, 18 Feb 2004 06:57:12 -0500 (EST)
Received: from localhost (reha3 [127.0.0.1])
 by MXR-3.estpak.ee (Postfix) with ESMTP id 7C0554D96A
 for <oracle-l@freelists.org>; Wed, 18 Feb 2004 13:58:51 +0200 (EET)
Received: from MXR-3.estpak.ee ([127.0.0.1])
 by localhost (reha3 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 26805-09 for <oracle-l@freelists.org>;
 Wed, 18 Feb 2004 13:58:51 +0200 (EET)
Received: from porgand (213-35-249-96-dsl.kvm.estpak.ee [213.35.249.96])
 by MXR-3.estpak.ee (Postfix) with SMTP id 140934D948
 for <oracle-l@freelists.org>; Wed, 18 Feb 2004 13:58:51 +0200 (EET)
Message-ID: <029001c3f616$927cc630$73f823d5@porgand>
From: =?iso-8859-1?Q?Tanel_P=F5der?= <tanel.poder.003@mail.ee>
To: <oracle-l@freelists.org>
References: <4ECF25179468EA4BB1BE66E8636BB2CF02A714B9@mlnyb706mb-m.msg.ml.com> <20040217215651.GC22451@mladen.wangtrading.com> <000f01c3f5a1$d8ec4b10$2501a8c0@dazasoftware.com> <20040217221309.GA22594@mladen.wangtrading.com> <001e01c3f5a9$5dc474a0$2501a8c0@dazasoftware.com>
Subject: Re: Counting number of rows, sequences with no sequences
Date: Wed, 18 Feb 2004 13:58:49 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Virus-Scanned: by amavisd-new at neti.ee
X-archive-position: 1037
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: tanel.poder.003@mail.ee
Precedence: normal
Reply-To: oracle-l@freelists.org
X-list: oracle-l

Hi!

This implementation will definitely miss rows in multi-user environments and
if your next recommendation would be to lock the row during the transaction,
then we'd have a major serialization and possibly a deadlocking problem.

Good initiatives by the way, but you should think them through before
recommending (or worse, implementing) somewhere.

Tanel.

> What you can do is to create a one record table, the if the transaction
> rollbacks it will rollback
>
> create table sequence( value number);
>
> function getnewsequence
> select value+1 into variable from sequence;
> update table sequence value=variable ;
> return variable ;
> end;
>
> ----- Original Message ----- 
> From: "Mladen Gogala" <mladen@wangtrading.com>
> To: <oracle-l@freelists.org>
> Sent: Tuesday, February 17, 2004 6:13 PM
> Subject: Re: Counting number of rows, sequences
>
>
> What happens if the transaction is rolled back?
>
> On 02/17/2004 05:03:14 PM, Juan Cachito Reyes Pacheco wrote:
> > The other choice if you have to frecuently do counts to that table is
> > a
> > sequence
> >
> > You create an addiatoinal field with a sequence
> >
> > CREATE SEQUENCE, etc.
> >
> > row  sequence
> >
> > 1       1
> > 2        2
> > ....
> > 1234  1234
> >
> > Then you select from the sequence the currval, and this is immediate.
> >
> >
> > ----------------------------------------------------------------
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > ----------------------------------------------------------------
> > To unsubscribe send email to:  oracle-l-request@freelists.org
> > put 'unsubscribe' in the subject line.
> > --
> > Archives are at http://www.freelists.org/archives/oracle-l/
> > FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> > -----------------------------------------------------------------
> >
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to:  oracle-l-request@freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to:  oracle-l-request@freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

