🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.linux
Article #69

Re: isql count(*) returns are inaccurate - IBConsole or command line

#69
From: hiram.barber
Date: Fri, 11 May 2001 02:19
53 lines
3446 bytes
"David Bakhash" <cadet@alum.mit.edu> wrote in message
news:m31yq4qb58.fsf@alum.mit.edu...
> >>>>> "hb" == hiram barber <hiram.barber@home.com> writes:
>
>  hb> While using isql (either command line or through IBConsole) to
>  hb> retrieve a row count (select count(*) from <tablename>) on an
>  hb> InterBase database it returns grossly inaccurate numbers
>  hb> (i.e. 129 for a table with a couple of thousand rows).
>
> While I don't think that this is the problem, I will throw it out
> there, because it's bit me a time or two.
>
> IB has a certain default isolation level that makes it appear to
> return wrong data.  Make sure that you've committed all other pending
> transactions from other windows, applications, etc.  Close them, then
> restart isql, and then do your select count(*).  See if that coincides
> with the number of rows that get printed to the console when you do a
> select *.  If you still see the problem, then yes, it's a bug.  But
> right now, it's still very possible that you *think* that the database
> contains these thousands of rows while they havn't been committed in
> the snapshot that your isql program is running in.  Also, note that
> even if they *were* committed, isql might still be in an old
> snapshot.  I don't know the details, except that you really must
> commit in all applications, close them, then restart isql and check
> again.
>
> dave

I appreciate your feedback.  I have been able to reproduce this on linux
and solaris platforms, windows works fine.

I have a feeling that the data is never being written to disk properly, but
continues
to queue (within interclient/interserver? memory?).  We open a database
connection pool, insert
via Auto Commit, but have someother isolation levels.  I currently have
Borland support
working on this to try to figure out what is going on.  But is something
that readers
of this group might want to keep a close eye on if they intend to use
InterClient JDBC.  It
seems like a concurrency issue between JDBC vs. other (ODBC, BDE, iSQL,
etc.).

Meanwhile, does anyone have JDBC code or specific database settings where
they are
manipulating the transactions and isolation levels?  Anything is worth a
try, please don't
be shy!

Regards,
Hiram
Technical Details
Message-ID: <d%HK6.11580$d26.151753@news1.wwck1.ri.home.com>
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!news-xfer.nuri.net!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.wwck1.ri.home.com.POSTED!not-for-mail
References: <dcpI6.8706$d26.112025@news1.wwck1.ri.home.com> <m31yq4qb58.fsf@alum.mit.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109030,2a3b56749762858b
X-Google-Attributes: gid109030,public
X-Google-ArrivalTime: 2001-05-10 19:24:02 PST
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!news-xfer.nuri.net!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.wwck1.ri.home.com.POSTED!not-for-mail
From: <hiram.barber@home.com>
Newsgroups: borland.public.interbase.linux
References: <dcpI6.8706$d26.112025@news1.wwck1.ri.home.com> <m31yq4qb58.fsf@alum.mit.edu>
Subject: Re: isql count(*) returns are inaccurate - IBConsole or command line
Lines: 55
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Message-ID: <d%HK6.11580$d26.151753@news1.wwck1.ri.home.com>
Date: Fri, 11 May 2001 02:19:53 GMT
NNTP-Posting-Host: 65.2.200.110
X-Complaints-To: abuse@home.net
X-Trace: news1.wwck1.ri.home.com 989547593 65.2.200.110 (Thu, 10 May 2001 19:19:53 PDT)
NNTP-Posting-Date: Thu, 10 May 2001 19:19:53 PDT
Organization: Excite@Home - The Leader in Broadband http://home.com/faster