Re: DBI to BerkeleyDB?
- From: jeff@xxxxxxxxxxxxxx (Jeff Zucker)
- Date: Fri, 25 Aug 2006 09:57:44 -0700
ManKyu Han wrote:
I moved "prepare" outside loop, so DBD::DBM (BerkeleyDB) works almost twice faster (100 -> 200 /sec) but compare to BerkeleyDB, it is still slower.If all you need is hash lookups on a single key and your main requirement is absolute speed, then stick with straight BerkeleyDB, it is guaranteed to be faster since it doesn't have to provide you with a SQL (or any) querying interface. If you need the portability and maintainability of a SQL interface, then use DBI. If you need SQL and absolute speed, then use DBI with SQLite or PostgreSQL or MySQL or a proprietary RDBMS. If you need SQL and want to make quick prototypes of databases or handle smaller datasets where absolute speed isn't your most important criterion or you need a SQL interface to pre-existing BerkeleyDB data, then use DBD::DBM.
Since DBD::DBM is now using BerkeleyDB, shouldn't it perform as well as BerkeleyDB ?? (or at least not as bad as what I got?)
Yes, 0.005 seconds per query is slow compared to other ways to access the data, but in many situations (e.g. a CGI environment), that amount of time will not even be perceptible compared to other things that cost time.
--
Jeff
(author of DBD::DBM)
.
- References:
- DBI to BerkeleyDB?
- From: ManKyu Han
- DBI to BerkeleyDB?
- Prev by Date: Re: DBD::Oracle 1.18 installation problem
- Next by Date: Re: Error:MSVCR80.dll not found (DBD::Oracle)
- Previous by thread: DBI to BerkeleyDB?
- Next by thread: RE: DBI to BerkeleyDB?
- Index(es):