Received: from mail.telekabel.nl (arnhem.telekabel.nl [194.134.132.130]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA21352 for ; Sat, 6 Nov 1999 05:40:25 -0500 (EST) (envelope-from Alex@Icepick.com) Received: from icepick.com (root@n084.apeldoorn.telekabel.euronet.nl [194.134.136.89]) by mail.telekabel.nl (8.8.8/8.8/EuroNet) with SMTP id LAA21189 from for ; Sat, 6 Nov 1999 11:40:17 +0100 (MET) From: Alex@Icepick.com (Alex) To: pgsql-sql@postgresql.org Subject: How to get last 10 rows in a table on a large database? Date: Sat, 06 Nov 1999 10:37:17 GMT Reply-To: Alex@Icepick.com Message-ID: <38270488.5980775@smtp.telekabel.nl> X-Mailer: Forte Agent 1.5/32.451 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id FAA21383 Hi, Does anyone have a good idea to get the last 10 rows from a table? I tried SELECT * FROM table ORDER BY datetime DESC LIMIT 10 But my table has over 1 million rows, so this takes forever.. anyone has a better idea on how to do this? Alex -- Alex van Es, P.O. Box 698, 7300 AR Apeldoorn, The Netherlands. 8 Webcams, doorbell, fridge, barcodescanner.. all connected to the internet. Check http://www.icepick.com for details.. NEW! A Hyperwired cat.. http://www.blackie.com!