🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Selecting row in which a column value is maximum

#11387
From: Craig Stuntz TeamB
Date: Mon, 25 Nov 2002 19:51
19 lines
2010 bytes
In article <3de27571$1@newsgroups.borland.com>, eddielee@tropicsoft.com 
says...
> If the index is sorted based on the index value, which seems pretty natural
> so that a particular record can be found easily based on its index, then
> going to the last record of the index of an ascending index will give the
> max value.
> 
	Keep in mind that the last record pointed to in the index might not 
be visible to the current transaction.  In which case you are stuck with 
trying to walk the index backwards -- which is hard when we're talking 
about a prefix-compressed tree structure.

	-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.184c493d33d5246b98a267@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!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> <MPG.184c120210a6b55a98a253@newsgroups.borland.com> <3de24925@newsgroups.borland.com> <MPG.184c1b6154274d7b98a260@newsgroups.borland.com> <3de27571$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 12:07:37 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 14:51:16 -0500
Message-ID: <MPG.184c493d33d5246b98a267@newsgroups.borland.com>
References: <3de051cf@newsgroups.borland.com> <3de0d0f0$1@newsgroups.borland.com> <MPG.184c120210a6b55a98a253@newsgroups.borland.com> <3de24925@newsgroups.borland.com> <MPG.184c1b6154274d7b98a260@newsgroups.borland.com> <3de27571$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 1038253782 65.86.87.242 (25 Nov 2002 11:49:42 -0800)
Lines: 19
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!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