Re: Cached vs Local Database - advice please

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Good questions, Grant.

Using a database will give you more lexibility with regards to organizing,
filtering, and querying the data. However, DataSets and DataTables have the
capability to filter and sort data without looping. And a database consumes
more resources to use, as well as being slower. So, whether to use a
database or an in-memory data source is pretty much dependent upon what you
want to do with the data.

Now, as to where to cache in-Memory data, you have basically 2 choices
(simplifying the explanation): Application Cache or Session. Application
Cache is shared across all Sessions and Pages. Session Cache is shared
across all pages for a single client Session. So, if the data is not
user-specific, Application Cache is the way to go with regards to an
in-memory cache, as there is only one copy of the data consuming memory for
the lifetime of the App.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Grant Merwitz" <grant@xxxxxxxxxxxxx> wrote in message
news:ePSzeTJfFHA.2512@xxxxxxxxxxxxxxxxxxxxxxx
> Hi
>
> I am currently weighing up two options.
>
> I have a data i need available for my website.
> However, this data is only available via a web service and too slow to
> retrieve on a user request basis.
>
> So i plan once a day load to download this data. Either into the Cache, or
> a local database i'll set up.
> I would like to know what the better method would be,
>
> We're talking about 1000 records, 20 fields (none to large). So really,
> not a large amount of data.
>
> Now i think Cache would be quicker. But this data needs to be searched and
> filtered.
> So would it be wiser to have the database setup as this may be quicker to
> filter
> Or is it just as efficient to loop through say a DataTable in memory?
>
> What's the best method here?
>
> Also, if the Cache is the way to go, whats the best way to store it -
> dataset, datatable, hash table, arraylist etc.
> And are there better ways of searching these than looping through them?
>
> TIA - this would be a great help
>


.



Relevant Pages

  • Re: Cached vs Local Database - advice please
    ... I think the database is the way to go. ... > the capability to filter and sort data without looping. ... >: Application Cache or Session. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: linq versus BindingSource.
    ... Work with database (Several database drivers supported: ... When using filter, I need before to do: ... If you want to use a variety of databases then you can't use Linq to SQL, which is a simple ORM for SQL Server. ... If you're used to using datatables, then moving to an ORM is a big step - and would probably require a large rewrite of your code. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: LDAP Performance (long)
    ... Cache the slapd's internal database lookups in slapd memory. ... The first is the new TAG:key lookup, ...
    (comp.mail.sendmail)
  • Re: OO vs. RDB challenge
    ... > Layer 1. ... If you filter your data after you retrieve it, ... possible to redesign the database schema to enable SQL to do its job. ... A good RDBMS could integrate an external authentication server. ...
    (comp.object)
  • Re: Cache-Size vs Performance
    ... logarithmic decrese in the miss rate as the cache size grows ... in big database applications ... ... where the database uses real storage to compensate for disk record ... database people in stl/bldg90 and the relational/sql system/r people ...
    (comp.arch)