Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 01 OCT 2002 10:01:45AM Scott Kapaona wrote:

Hi,

 Which one does what? How would they be used on a key to a record?

Thanks,

Scott


At 01 OCT 2002 10:15AM [url=http://www.sprezzatura.com" onMouseOver=window.status= Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

Quickdex indexes Alphanumberics and Rightdex Numerics. It simply means that the records are returned in a sorted order rather than hash order. Useful for things like State tables etc.

The Sprezzatura Group

World Leaders in all things RevSoft


At 01 OCT 2002 12:07PM Tony Marler@Prosolve Software (UK) wrote:

Scott

Also be aware that the 'sorted' keys are held in one AREV record so you are limited to 64k worth of keys (plus a delimeter) at which point it breaks. Only use for small lookup type tables.

Tony


At 02 OCT 2002 06:03AM Hippo wrote:

The name Rightdex describes the fact that keys in this index

are right aligned. … 'b' < 'aa' because ' ' < 'a'.

I never use either of them, btree is better choice.

In all cases think about the 64Kb limit.


At 02 OCT 2002 06:47AM [url=http://www.sprezzatura.com" onMouseOver=window.status= Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

Hmm let's think about this one. You have 5000 records with a key length of say 5 bytes. There will be a one to one correspondence in the index node between field 4 and 5, so that's 12 bytes per row, plus the node overhead, let's call it another 30 bytes. The nodes are 1K so we'll fit about 80 keys per node. So for 5000 rows to list the file in sorted order we'll have to read 60 nodes PLUS all of the other index transaction associated logic, as opposed to a single disk read for the quickdex?

Quickdexes have their place.

The Sprezzatura Group

World Leaders in all things RevSoft


At 02 OCT 2002 07:38AM Don Miller - C3 Inc. wrote:

Other tricks:

FORM-LIST %RECORDS%,1 will get you an active select list

or

READ REC FROM YOURFILE,%RECORDS% THEN

NUM_RECORDS=COUNT(REC,@VM)+(REC # '')

will get you a count of the keys

Quickdex/Rightdex does have its place, particularly in static tables with a reasonable number of records/keys.

Don


At 07 OCT 2002 07:11AM Hippo wrote:

OK,OK

For static tables the BTREEs does not need updating.

I am not sure, but all record keys will fit to one record, too.

The only overhead will be about two other reads on BTREE structure.

But I never program the BTREE logic, I just studied the BTREE structure when we had Index corrupted.

The tricks used with %RECORDS% can be done on corresponding record of the index file. (If guaranted it is only one). If you know the location, you can use it, but it is not as natural as rightdex/quickdex.

On the other side there is no risk in the case the table is not as static as you originaly expected.

The trick with RECCORDCOUNT … I use the RECORDCOUNT maintained in the group 0 of the LK file. It is as fast as yours (1 read).

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/c400cf2b20c847ca85256c45004d1094.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1