RE: Searching for Data in EDS

new topic     » topic index » view thread      » older message » newer message

> From: C. K. Lester [mailto:cklester at yahoo.com]

> Let's say I have records set up like this:
> 
> key: X, data: Y
> 
> where X and Y are integers (atoms).
> 
> How would I find all records with Y = 2?
> 
> Do I just have to loop through all the records? What if I 
> have a million
> records?!
> 
> Elsewhere, anybody already have good code for managing EDS 
> files to handle
> cases like this (a function that returns a sequence with the 
> record numbers
> of all records where Y = 2)...?

Your best bet is to use indices (there was a fairly in depth treatment on
this topic previously--I believe the question was regarding record albums,
and I think Irv was the main responder), where you keep a separate
table/record to remember all the keys which have certain properties.

I'm working on a lib (slowly and inconsistently :) to make EDS into a SQL
db, and have some limited support for indices currently, but without some
sort of index, you'll need to loop through all records.

Matt Lewis

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu