Forum BigDB Size of a BigDB

Discussion and help relating to the PlayerIO database solution, BigDB.

Size of a BigDB

Postby johnnyk427 » April 20th, 2012, 8:05 am

Is there a way to query how many objects are in a table of bigDB?
johnnyk427
Paid Member
 
Posts: 9
Joined: March 31st, 2012, 2:05 am

Re: Size of a BigDB

Postby mindbogglegames » April 20th, 2012, 10:14 am

Use can use loadRange as long as there isn't more than 1000 objects in the database. That is the limit that you can return as far as I know. Note that this actually returns all the objects too, so it's kind of messy and bandwidth hog.

Or whenever you store a new object in the table you also have a counter that ticks up, stored in the same table or some other settings table
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Size of a BigDB

Postby Henrik » April 20th, 2012, 11:30 am

In the BigDB admin panel we show how many objects are in each table, and the total size of all the data stored.

However, there are no API methods for counting objects in a table or index.

What functionality are you trying to build?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Size of a BigDB

Postby johnnyk427 » April 21st, 2012, 12:28 am

I'm making a game where players create drawings, and wanted to make a counter '<x> pictures created so far by all players'. Sounds like keeping a separate counter is the way to go, just harder to keep in sync.
johnnyk427
Paid Member
 
Posts: 9
Joined: March 31st, 2012, 2:05 am

Re: Size of a BigDB

Postby Henrik » April 24th, 2012, 1:57 pm

Yes, use a separate counter.

If you want to be really sure your value is in sync, you can use optimistic locking in BigDB, but on the other hand this is a typical value that doesn't have to be accurate, it just has to be in the right magnitude and look believable.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to BigDB