The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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
29.3k287438644
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: 427 times

last updated: 20 Feb '14, 18:48