Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

record count

2 posts in General Discussion Last posting was on 2011-08-22 04:52:37.0Z
John Posted on 2011-08-22 04:28:43.0Z
From: "John" <johntlf@hotmail.com>
Newsgroups: sybase.public.ase.general
Subject: record count
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e51dafb$1@forums-1-dub>
Date: 21 Aug 2011 21:28:43 -0700
X-Trace: forums-1-dub 1313987323 10.22.241.152 (21 Aug 2011 21:28:43 -0700)
X-Original-Trace: 21 Aug 2011 21:28:43 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30485
Article PK: 72664

I found the record count is different with actual. What cause is it ?

select 'Table record counts --> ', o.type, o.name, rowcnt (i.doampg)
from sysobjects o, sysindexes i
where o.type in ('U', 'S') and
i.id = o.id
and i.indid < 2
order by o.type, o.name


**Adaptive Server Enterprise/12.5.2/EBF 11791/P/Sun_svr4/OS
5.8/ase1252/1831/64-bit/FBO/Fri Apr 9 12:47:36 2004


Michael Peppler [Team Sybase] Posted on 2011-08-22 04:52:37.0Z
From: "Michael Peppler [Team Sybase]" <mpeppler@peppler.org>
Organization: Peppler Consulting SARL
Subject: Re: record count
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2011.08.22.04.52.37.559896@peppler.org>
Newsgroups: sybase.public.ase.general
References: <4e51dafb$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 21 Aug 2011 21:52:37 -0700
X-Trace: forums-1-dub 1313988757 10.22.241.152 (21 Aug 2011 21:52:37 -0700)
X-Original-Trace: 21 Aug 2011 21:52:37 -0700, vip152.sybase.com
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30486
Article PK: 72665


On Sun, 21 Aug 2011 21:28:43 -0700, John wrote:

> I found the record count is different with actual. What cause is it ?
>
> select 'Table record counts --> ', o.type, o.name, rowcnt (i.doampg) from
> sysobjects o, sysindexes i
> where o.type in ('U', 'S') and
> i.id = o.id
> and i.indid < 2
> order by o.type, o.name
>
>
> **Adaptive Server Enterprise/12.5.2/EBF 11791/P/Sun_svr4/OS
> 5.8/ase1252/1831/64-bit/FBO/Fri Apr 9 12:47:36 2004

The record count is not kept fully in sync in sysindexes - that would be
too expensive (too much overhead added to each insert/delete). If you run
update statistics on the table you should see the correct count, however.

Michael