Selecting the last 2 rows of a table

From: Machiel Richards <machielr(at)rdc(dot)co(dot)za>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Selecting the last 2 rows of a table
Date: 2010-11-09 09:34:48
Message-ID: 1289295288.2280.28.camel@machielr-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Good day all

I am trying to find out how I can select the last 2 or (n amount )
of rows from a specific table.

We have a table which has been growing rediculously the last view
days (I must say after a code go-live).

I am trying to find out what data is being written to the table
that is causing this, however due to the size of the table at the
moment, it can cause problems so I am just interested in the last number
of records.

I would appreciate any assistance in this.

Regards
Machiel

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Thom Brown 2010-11-09 09:42:22 Re: Selecting the last 2 rows of a table
Previous Message Vaduvoiu Tiberiu 2010-11-09 07:38:16 Delete low priority equivalent in postgresql?