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

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
accept rate: 32%

Excellent! thx!

(20 Feb '14, 16:50) pLee

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



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:


question asked: 20 Feb '14, 15:43

question was seen: 440 times

last updated: 20 Feb '14, 18:48