Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

What is the best way to see how many row on each table, instead of using count()?

asked 20 Feb '14, 15:43

pLee's gravatar image

pLee
214111220
accept rate: 0%


If approximate numbers are sufficient, you can query the system catalog (row numbers are updated on each checkpoint):

select table_name, count from systab order by table_name
permanent link

answered 20 Feb '14, 16:33

Volker%20Barth's gravatar image

Volker Barth
40.3k363551822
accept rate: 34%

Excellent! thx!

(20 Feb '14, 16:50) pLee
1

You could also add a "Checkpoint;" command just prior to Volker's select to force more up-to-date counts.

(20 Feb '14, 18:48) Bill Aumen
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×8

question asked: 20 Feb '14, 15:43

question was seen: 3,473 times

last updated: 20 Feb '14, 18:48