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

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:

×5

question asked: 20 Feb '14, 15:43

question was seen: 454 times

last updated: 20 Feb '14, 18:48