Forum BigDB Can I only load some fields

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

Can I only load some fields

Postby robertflesch » September 10th, 2014, 2:37 pm

My app is displaying a list of possible objects to load. Currently I am retrieving the whole object (but that seem like a waste of bandwidth and a speed hit).

Coming from a SQL background, I know you can select only the fields you want from a row.
Lets say the table has 4 fields,
owner:String,
date_created:Date,
date_modified:Date,
BIG_BINARY:byte array (1000 times larger then the rest of the data).

select owner, date_created from myTable where owner = me
I know I can filter on owner = me, but is it possible reduce the amount of data?
Another way to do this would be to have the data link actually go to another table where the binary resided, but that is kind of ugly.
Nice thing is this saves both users, and YGN from having to download the BIG_BINARY object unless its needed...

bob
robertflesch
Paid Member
 
Posts: 136
Joined: April 22nd, 2013, 9:18 pm

Re: Can I only load some fields

Postby robscherer123 » September 11th, 2014, 1:45 pm

Unfortunately I don't believe this is possible. You can only load the entire DB object (all properties included). Best bet would just be to keep as little properties on each object as possible and to keep the property names shorter to save even more data.
robscherer123
Paid Member
 
Posts: 313
Joined: December 12th, 2012, 8:46 pm

Re: Can I only load some fields

Postby robertflesch » September 11th, 2014, 4:02 pm

You are my hero Rob (I assume that is your name).

I started game programming when optimizing for dial-up connections was something to be concerned about.
So optimizing (sometimes too early) is still something that I worry about.
I guess compressing my ByteArray will have to do.

Property names and number of properties are a drop in the bucket compared to the size of the byteArray.
I am using a compressed byteArray to store my 3D models, animations, etc.
robertflesch
Paid Member
 
Posts: 136
Joined: April 22nd, 2013, 9:18 pm


Return to BigDB



cron