Indexes

Joakim Schramm joakim at astrocalc.com
Thu Jun 1 16:53:47 CDT 2006


 

> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of 
> Ruslan Zasukhin
> Sent: 01 June 2006 16:39
> To: valentina at lists.macserve.net
> Subject: Re: Indexes
> 
> On 6/1/06 4:15 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:
> 
> Hi Joakim,
> 
> > This may be a kind of "stupid" question, but I am not that in depth 
> > familiar with all agles of databases.
> > 
> > I simply wonder "when" is it really benefital or even necessary to 
> > index a field? Is it soley in regards of searches? I assume a field 
> > can be searched if not indexed as well, but lets say if it just is 
> > question of random or not so frequent searches, mostly 
> looking for and 
> > returning a single records, how big impact are we talking 
> of here in 
> > performance? I assume count of records also makes a 
> difference here? 
> > Lets say it just 10000 or even 1000 records to search does 
> an index really make a notible difference?
> 
> You need index fields which you use often in searches. Point.
> 
> The more indexes - the faster searches,
> The more indexed - the slower Add/Delete.
> 
> You search for a gold middle.
> 
> I think in your case you will fill db by some records, After 
> this db will be stable enough, right ?

Well I have db's currently, 1 with 200 000+ records, this comes filled and
done. It's possible to add and edit but rarely needed.

Then I have one db which comes empty, actually created on first run, this I
think in most cases will have no more then 1-2000 "base records", often much
less, but by time... It also have several sub tables with 1:M relation and
here record count can grow bigger, relation 1:35 in one case but still not
very big db. Will probably have some complex relations though but I am not
sure yet as I basically design it while I rewrite my base code to use
Valentina for this. I also try to think in future need, which is why I
design this way, as I good I see posible future amendments to my program and
try to design with it in mind.

I know I can "recreate" db later if needed but it's risky and it would be a
disaster if users lost data.

> And only searches will be made to your db mainly.
If first db yes in db2 add, edit, delete and search but most the latter in a
longer perspective.

> The same is true for e.g. WEB dbs.
> 
> -
> If you do one search on 1000 records, may be you will not see 
> difference But if you do such searches in hot loop ..
> 
Ok thnks think I have a pretty good view then, which basically is what I was
thinking about it.

Regards,

Joakim
> 
> --
> Best regards,
> 
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
> 
> Valentina - Joining Worlds of Information http://www.paradigmasoft.com
> 
> [I feel the need: the need for speed]
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 



More information about the Valentina mailing list