Following will create a lot of rows but the key size would be small: from_time = x milliseconds till_time = y milliseconds
for(var i=from_time; i<=till_time; i += 60000){ //for each visitor, a row
for every minute he/she was inside.
emit(i, doc._id);
}
Then you can query with the time (in millisecs) as the key to get all
visitors.
regds,
mano
