How to get the MOST out of a database?

From: <drevil(at)sidereal(dot)kz>
To: pgsql-general(at)postgresql(dot)org
Subject: How to get the MOST out of a database?
Date: 2000-12-30 07:18:26
Message-ID: 20001230071826.9498.qmail@mailhost.sidereal.kz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


In my application, I often want to select one row from a database
which is the most of something. Perhaps I want the most recent row
corresponding to a certain user. One way to do this is to

SELECT .... SORT BY date LIMIT 1

but I can't believe that this is an efficient way to do it. Or is it?

Thanks,

Dr Evil

Browse pgsql-general by date

  From Date Subject
Next Message Thomas T. Thai 2000-12-30 07:42:11 NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]
Previous Message Tom Lane 2000-12-30 06:38:05 Re: Re: Failed Statements within Transactions