[英]server-side SQL library
Does a library exist in .net that can perform queries server-side? .net中是否存在可以在服务器端执行查询的库?
The reason I ask is even though I've used many tricks to maximize database performance such as SELECT
ing and JOIN
ing on the PRIMARY
, using INT
s as the PRIMARY
, fixed LENGTH
s, UPDATE
ing instead of DELETE
ing, no NULL
s for columns to be UPDATE
d, and UPDATE
ing tables by using an INT
"state" column (such as "active", "inactive", etc), but latency times go from <10ms to >100ms just by using a few SELECT
s with 1 JOIN
each using the techniques above. 我问的原因是,即使我使用了许多技巧来最大化数据库性能,例如在
PRIMARY
上执行SELECT
ing和JOIN
,使用INT
作为PRIMARY
,固定LENGTH
,使用UPDATE
而不是DELETE
,对于NULL
没有使用INT
“状态”列(例如“活动”,“非活动”等)对UPDATE
列和UPDATE
表进行更改,但是仅通过使用几个带有SELECT
,延迟时间就从<10ms变为> 100ms使用上述技术,每个JOIN
1个。
I'm going to start using the server to JOIN
instead because I've had lots of success with driving lag back down <10ms doing so, but I'm wondering if there's already a library or built-in feature that can do this. 我将开始使用服务器来
JOIN
因为这样做在将延迟回落到<10ms方面取得了很大的成功,但是我想知道是否已经有一个库或内置功能可以做到这一点。
An example would be breaking a single JOIN
query into multiple queries: 一个示例是将单个
JOIN
查询分解为多个查询:
SELECT
a specific row from a table1
based upon the PRIMARY
key PRIMARY
键从table1
SELECT
特定行 SELECT
a specif row from table2
based upon the PRIMARY
located in table1
table1
的PRIMARY
从table2
SELECT
一个指定行 And the complexity only increases from there. 而且复杂性只会从那里增加。 Does such a library/feature exist for .net?
.net是否存在这样的库/功能?
Many thanks in advance! 提前谢谢了!
It sounds like you're looking for something like the ADO.NET Entity Framework . 听起来您正在寻找类似ADO.NET实体框架的东西。 Using LINQ, you can query data in code in such a way that the query expressions are converted to SQL and optimized (as best as possible) to get the data you're querying.
使用LINQ,您可以通过以下方式查询代码中的数据:将查询表达式转换为SQL并进行优化(尽可能最佳化)以获取要查询的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.