The forum will be down for maintenance at some point from Friday, November 16 at 19:00 EDT until Sunday, November 18 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

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
216101119
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
32.4k328476692
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:

×7

question asked: 20 Feb '14, 15:43

question was seen: 899 times

last updated: 20 Feb '14, 18:48