• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BitSet

 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every one,

I want to know can i get data from the resultSet lets say a string and put it in a bitset ?? i need to do that because i'm dealing with large database and need to reduce the memory cost !?

thanx in advance.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of data do you have in your ResultSet? Booleans? BitSet stores a number of single bits (unless you wanted to do some creative bit manipulation, and store integers).
I'm also unclear on where you want to conserve memory - in the DB or in RAM? In the DB, a BitSet would probably be stored as a BLOB, which most likely is not going to save space over storing booleans.
But it's all tough to answer because you don't provide details on what you're trying to accomplish.
 
loay saada
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well,
in the question above i mean the cost of memory for the RAM,i get data of table as ResultSet and i do (while.next) to get these data, but i was finding this loop cost and west my time cos" maybe the data in the table is 10,0000000, if i want to add the resultSet to ArrayList maybe the memory will be full, so i am thinking to add all the data in BitSet, my question is, is there is a way to do that cos" i have String data in that table not just integer
any help
thanks
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I mean the cost of memory for the RAM,i get data from table as ResultSet and i do (while.next) to get these data, but i was finding this loop cost and waist my time, maybe the data in the table is 10,0000000, if i want to add the resultSet to ArrayList maybe the memory will be full, so i am thinking to add all the data in BitSet, my question is, is there any way to do that because i have String data in that table not just integer
any help
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic