couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Logsdon <john.logs...@netdev.co.uk>
Subject Efficient ways of storing large lists of numbers?
Date Sun, 10 Oct 2010 19:55:07 GMT
Hi

I'd like to draw on the experience of the user community to see if there is
a more efficient way to store large lists of numbers.

in my simplest case I have just a List of Numbers with no data attached i.e.
my doc looks something like this:

{
   "_id":"<a uuid>",
   "_rev":"<a couchdb rev",
   "list_id":"The enclosing list uuid",
   "no":"012739876543"
}

I can shrink that done to:

{
   "_id":"012739876543",
   "_rev":"<a couchdb rev",
   "list_id":"The enclosing list uuid",
}

With the latter I can just search for docs by _id and avoid the expense of
the index.

My lists of telephones can be quite large (Several million) so I'm wondering
if there are better ways to store such simple data in couchdb? e.g. Avoid
one document per number and go for a more complex document with multiple
numbers, array, or whatever.

BTW - The document per number is workable, I'm merely wondering whether I'm
over-egging the problem.

Anyway, I thought I'd ask as i'm sure you've come up with some very creative
solutions for various domains that could be useful to people like me.

Regards

John

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message