Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Storing data rows in hashmap  RSS feed

 
rachana ravali
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
i have a requirement where i have to put rows from database into hashmap as keys and values.
I have a doubt whether hashmap can support large data such as 2000 records or entries.

Can any one please clarify whether it is a good idea to have such as huge data in maps for avoiding network traffic with database.

Thanks in advance.
 
Manish Singh
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it reduces the DB calls then yes. And you need to look at whats the size of the entry. I mean you should be aware of the total memory taken by the hashmap
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2000? That isn't "huge". It isn't even "large". Consider that your memory is measured in megabytes -- that's millions of bytes.
 
rachana ravali
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks manish and paul ... thank you very much for replying..
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!