🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11375

Re: Selecting row in which a column value is maximum

#11375
From: Craig Stuntz TeamB
Date: Mon, 25 Nov 2002 15:55
21 lines
1614 bytes
In article <3de0d0f0$1@newsgroups.borland.com>, "Arno Brinkman" 
<bnewsgroups @ abvisie.nl> says...
> SELECT
>   *
> FROM
>   ATable
> WHERE
>   ATable.AField = (SELECT MAX(AField) FROM ATable)
> 
> I'm afraid that the above query will be slow, so it's faster to use an SP.
> 
	Shouldn't be a problem if there's a DESCENDING INDEX on 
ATable.AField.

	-Craig

-- 
Craig Stuntz [TeamB] � Vertex Systems Corp. � Columbus, OH
Delphi/InterBase Weblog : http://delphi.weblogs.com
InterBase Perf. Monitor : http://delphi.weblogs.com/IBPerformanceMonitor
InterBase PLANalyzer 1.1: http://delphi.weblogs.com/IBPLANalyzer
Technical Details
Message-ID: <MPG.184c120210a6b55a98a253@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3de051cf@newsgroups.borland.com> <3de0d0f0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 114a0e,60a1aedc82f6444
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-11-25 08:06:27 PST
From: Craig Stuntz [TeamB] <cstuntz@nospamplease.com  (but use vertexsoftware to email)>
Newsgroups: borland.public.interbase.sql
Subject: Re: Selecting row in which a column value is maximum
Date: Mon, 25 Nov 2002 10:55:34 -0500
Message-ID: <MPG.184c120210a6b55a98a253@newsgroups.borland.com>
References: <3de051cf@newsgroups.borland.com> <3de0d0f0$1@newsgroups.borland.com>
Organization: Vertex Systems Corporation
X-Newsreader: MicroPlanet Gravity v2.60
NNTP-Posting-Host: 65.86.87.242
X-Trace: newsgroups.borland.com 1038239641 65.86.87.242 (25 Nov 2002 07:54:01 -0800)
Lines: 21
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail