性能 - 用户定义的查询/过滤器来搜索数据

发布于 2024-08-29 02:43:27 字数 386 浏览 8 评论 0原文

设计一个用户可以创建自己的数据搜索标准的系统的最佳方法是什么?我所说的“设计”是指数据存储、数据访问层和搜索结构。

我们实际上将重构用 C# 和 ASP .NET 编写的现有应用程序,并且我们不想更改基础结构。我们的主要问题是性能,我们使用 MSSQL 和 DevExpress 来构建查询。有些查询运行时间为 4-5 分钟,并且查询中包含的所有列都有索引。

当我检查查询时,我发现 DevExpress 构建了太多“存在”子句,我对此并不满意,因为我怀疑其中一些查询会跳过某些索引。

DevExpress 的替代品有哪些? NHibernate 还是实体框架?我们可以建立动态标准系统并将其存储到两者的数据库中吗?

我们是否还需要任何替代存储,例如 lucene 索引或 OLAP 数据库?

What is the best way to design a system where users can create their own criterias to search data ? By "design" i mean, data storage, data access layer and search structure.

We will actually refactor an existing application which is written in C# and ASP .NET and we don't want to change the infrastructure. Our main issue is performance and we use MSSQL and DevExpress to build queries. Some queries run in 4-5 minutes and all the columns included in the queries have indexes.

When i check queries, i see that DevExpress builds too many "exists" clauses and i'm not happy with that because i have doubts that some of these queries skip some indexes.

What may be the alternatives to DevExpress? NHibernate or Entity Framework? Can we build dynamic criteria system and store these to database in both of them ?

And also do we need any alternative storage like a lucene index or OLAP database?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

真心难拥有 2024-09-05 02:43:27

这个问题之前已经被问过,包括此处

问题是,如果您的查询现在需要 4-5 分钟,想象一下当用户自己创建查询时它们的运行速度会快多少(/讽刺)。我建议您将一些预定义的、精心调整的查询放在一起,并允许用户添加参数或过滤器,但不要让他们滚动自己的查询。您会后悔的,不仅仅是因为性能原因,还因为他们不明白如何正确限制他们的查询,并且他们会得到错误的答案

This question has been asked before, including here.

The problem is that if your queries take 4-5 minutes now, imagine how much quicker they will run when users are creating the queries themselves (/sarcasm). I suggest you put together some pre-defined, well tuned, queries and allow users to add parameters or filters, but don't let them roll their own queries. You will regret it, not just for performance reasons, but because they won't understand how to correctly limit their queries, and they will get the wrong answers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文