psql: what's the SQL to compute the ratio of table sizes?

From: "Kynn Jones" <kynnjo(at)gmail(dot)com>
To: "pgsql-general General" <pgsql-general(at)postgresql(dot)org>
Subject: psql: what's the SQL to compute the ratio of table sizes?
Date: 2008-10-17 19:30:00
Message-ID: c2350ba40810171230rf9ebce4rfc4433b278127242@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Suppose I have two table X and Y and I want to compute the ratio of the
number of rows in X and the number of rows in Y. What would be the SQL I
could type into a psql session to get this number?
This is an example of the recurring problem of performing arithmetic using
the result of various calls to count(*) (or other mathematic functions).

TIA!

Kynn

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Diogo Biazus 2008-10-17 19:32:23 Re: Copying Blobs between two tables using Insert stmt
Previous Message Serge Fonville 2008-10-17 19:26:27 Re: Annoying Reply-To