如何在C#应用程序中缓存数据库tabke [英] How to cache data base tabke inside C# application

查看:94
本文介绍了如何在C#应用程序中缓存数据库tabke的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个要求,我需要在我的应用程序中缓存数据库,因为它有很多记录,我需要一次又一次地查询哪个记录很多电脑资源。



我们要缓存表格然后再查询。





我们需要在Biztalk地图中实现



我尝试过:



可以缓存在数据集中。

或实体对象但它可以与biztalk mao一起工作。





Hi,

I have a requirement where I need to cache data base in my application because it has many record which I need to query again and again which take lot of resources of computer.

we want to cache table and then query it again.


this we need to achieve in Biztalk Map

What I have tried:

can cache in dataset.
or Entity object but will it work with biztalk mao.


Thanks,
Amit

推荐答案

你正在考虑这个问题。您不缓存表,以便可以在本地查询它。这实际上会使它变得更加密集,因为你不再使用设计用于非常有效地执行查询操作的SQL引擎。



您将查询结果缓存到稍后重用它们,而不是要查询的数据库表。
You're thinking about this backwards. You don't cache the table so you can query it locally. That will actually make it MORE intensive because you're no longer using the SQL engine that was designed to do query operations very efficiently.

You cache the results of queries to reuse them later, not the database table to query.


这篇关于如何在C#应用程序中缓存数据库tabke的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆