dbTalk Databases Forums  

Need advice on which method to use

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Need advice on which method to use in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nodger
 
Posts: n/a

Default Need advice on which method to use - 01-05-2006 , 08:16 PM






Im currently using lots of small files as a "database" on the backend
on my website. however the server load is gradually creeping up and im
going to re-write my application,

I need advise on using the recno db structure. Its the only one that
allows arbitrary lengths of records. Ok, I need this. so that narrows
it down.

Now, I need to store bits of info about each visitor in a record, and
these records can grow over time, and I will also need to "trim" these
now and again and delete them. also the IP address of the surfer will
be the key. Is this suited to recno?

I dont want to waste my time programming this only to find out later
that its not suitable.

i could choose something like the btree and use a fixed-length for each
record. of course then id have to limit the amount of info for the
surfers that visit a lot and id be wasting a lot of space for the
surfers that jusst visit once or twice.

Finally, I know disk fragmentation can occour but thats life, however I
suppose my main question is can "fragmentation" occour in a recno
database? I can always copy my files onto a new server.

Thanks in advance for any useful info


Reply With Quote
  #2  
Old   
Florian Weimer
 
Posts: n/a

Default Re: Need advice on which method to use - 01-06-2006 , 04:11 AM






* nodger:

Quote:
I need advise on using the recno db structure. Its the only one that
allows arbitrary lengths of records. Ok, I need this. so that narrows
it down.
Normal B-trees also do not impose significant limits on the record
size (besides the 2 GB limit, which also affects Recno databases).

Quote:
Now, I need to store bits of info about each visitor in a record, and
these records can grow over time, and I will also need to "trim" these
now and again and delete them. also the IP address of the surfer will
be the key. Is this suited to recno?
No, you should use B-trees.


Reply With Quote
  #3  
Old   
nodger
 
Posts: n/a

Default Re: Need advice on which method to use - 01-06-2006 , 09:24 AM



thanks, that sounds like good advice. I didn't know about this 2Gb
limit. any way of increasing it?


Reply With Quote
  #4  
Old   
Florian Weimer
 
Posts: n/a

Default Re: Need advice on which method to use - 01-06-2006 , 03:39 PM



* nodger:

Quote:
thanks, that sounds like good advice. I didn't know about this 2Gb
limit. any way of increasing it?
Do you really need keys or values larger than two gigabytes? This is
not a limit on database size.


Reply With Quote
  #5  
Old   
nodger
 
Posts: n/a

Default Re: Need advice on which method to use - 01-06-2006 , 07:04 PM



sorry, I thought you meant the entire database


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.