Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4118836
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:00:44+00:00 2026-05-20T23:00:44+00:00

I want to use a lookup map or dictionary in a C# application, but

  • 0

I want to use a lookup map or dictionary in a C# application, but it is expected to store 1-2 GB of data.

Can someone please tell if I will still be able to use dictionary class, or if I need to use some other class?

EDIT : We have an existing application which uses oracle database to query or lookup object details. It is however too slow, since the same objects are getting repeatedly queried. I was feeling that it might be ideal to use a lookup map for this scenario, to improve the response time. However I am worried if size will make it a problem

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:00:45+00:00Added an answer on May 20, 2026 at 11:00 pm

    Short Answer

    Yes. If your machine has enough memory for the structure (and the overhead of the rest of the program and system including operating system).

    Long Answer

    Are you sure you want to? Without knowing more about your application, it’s difficult to know what to suggest.

    • Where is the data coming from? A file? Files? A database? Services?
    • Is this a caching mechanism? If so, can you expire items out of the cache once they haven’t been accessed for a while? This way, you don’t have to hold everything in memory all the time.
    • As others have suggested, if you’re just trying to store lots of data, can you just use a database? That way you don’t have to have all of the information in memory at once. With indexing, most databases are excellent at performing fast retrieves. You could combine this approach with a cache.
    • Is the data that will be in memory read only, or will it have to be persisted back to some storage when something changes?
    • Scalability – do you expect that the amount of data that will be stored in this dictionary will increase as time goes on? If so, you’re going to run into a point where it’s very expensive to buy machines that can handle this amount of data. You might want to look a distributed caching system if this is the case (AppFrabric comes to mind) so you can scale out horizontally (more machines) instead of vertically (one really big expensive point of failure).

    UPDATE

    In light of the poster’s edit, it sounds like caching would go a long way here. There are many ways to do this:

    • Simple dictionary caching – just cache stuff as its requested.
    • Memcache
    • Caching Application Block I’m not a huge fan of this implementation, but others have had success.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use JQuery mobile for the front-end of my mobile application, but I
I want to use the STL's Map container to lookup a pointer by using
i want use some data from a website with web service. i have a
I want to use ADO.NET Prepare command will increase performance if query is repeatevely
I want to use netlink to communicate between an application and kernel space. My
I want to use the look of standard buttons on my page, but I
I want to use the Django admin interface for a very simple web application
I want to implement some sort of lookup table in C++ that will act
I want to use Infinispan with hibernate second level cache. My application is running
I want to use connection pooling with Jetty 6 , but so far it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.