有没有可以快速处理大型数据集的DBGrid组件?

发布于 2024-07-06 20:39:29 字数 278 浏览 12 评论 0原文

大型数据集、数百万条记录需要特殊编程来保持 DBGrid 的速度。

我想知道是否有任何现成的 Delphi (DBGrids) 组件可以自动执行此操作?

编辑例如:某些数据库具有获取第 1 X 条记录(例如 100 条记录)等功能。 当我滚动到底部时,我想自动获取下一个 100。相反,当我到达开头时,我想获取前 100 个。我知道我可以对此进行编程,但肯定可以将该功能传播到DBGrid 控件由 DBGrid 进行缓冲。 它将节省相当多的编程时间——可以这么说,您只需设置“缓冲区大小”即可。

Large datasets, millions of records, need special programming to maintain speed in DBGrids.

I want to know if there are any ready-made components for Delphi (DBGrids) that do this automatically?

EDIT For Example: Some databases have features such as fetch 1st X records (eg 100 records). When I reach the bottom with scrolling, I want to auto fetch the next 100. Conversely when I reach the beginning, I want to fetch the previous 100. I know I can program this, but it sure is possible to propagate that feature to a DBGrid control where the DBGrid does the buffering. It will save quite a bit of programming - you simply have to set the "buffer size" so to speak.

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

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

发布评论

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

评论(5

云归处 2024-07-13 20:39:29

您可能想看看精彩的(免费、开源、双重许可为 MPL 1.1 和 GPL,因此可在闭源应用程序中使用)Virtual TreeView 及其用户提供的后代(向下滚动页面找到它们。)

编辑以反映问题的编辑:Virtual TreeView 不仅允许您处理数百万个节点而不将它们保留在内存中,而且实际上这是使用它的首选方式。 您可以在需要时通过事件回调提供数据,并且可以告诉树缓存该数据(或不缓存)。

哦,当然它还有一个网格/报告模式,可以用作表格(只需设置GridExtensions 属性设置为 True。)

You might want to take a look at the wonderful (free, open source, dual licensed as MPL 1.1 and GPL thus usable in closed source apps) Virtual TreeView and its user-supplied descendants (scroll down the page to find those.)

Edit to reflect the question's edit: Virtual TreeView not only allows you to handle millions of nodes without keeping them in memory, but that is in fact the preferred way of using it. You supply the data through event callbacks when it's needed, and you can tell the tree to cache that data (or not.)

Oh, and of course it also has a grid / report mode where it can function as a table (just set the GridExtensions property to True.)

回梦 2024-07-13 20:39:29

我想看看 Developer Express QuantumGrid Suite。 (@birger:你只是快了一点;-))所以我不仅仅是重复答案,而是进行一些阐述:

DevExpress 网格使用一个数据控制器,它有多种模式来控制绑定到网格的数据。 其中之一正是您正在寻找的:

网格模式

使用网格模式时,只有固定的
加载的数据集记录数
进入记忆。 因为只有有限的
记录集是从
数据集、自动排序、过滤
并禁用汇总计算
在网格模式下(必须控制
手动代替)。 默认情况下,这
模式被禁用并且
ExpressDataController 加载所有
数据集中的记录。

它确实有一些缺点,这些缺点似乎非常明显:如果您手头没有所有记录,则无法进行汇总、排序或过滤。

I would have a look at Developer Express QuantumGrid Suite. (@birger: you just were a tick faster ;-) ) So I'm not just duplicating the answer, some elaboration:

The DevExpress Grid uses a data controller that has several modes to controll the data bound to the grid. One of these is exactly what you are looking for:

Grid Mode

When using Grid Mode, only a fixed
number of dataset records is loaded
into memory. Because only a limited
set of records are retrieved from the
dataset, automatic sorting, filtering
and summary calculations are disabled
in Grid Mode (must be controlled
manually instead). By default, this
mode is disabled and the
ExpressDataController loads all
records in a dataset.

It does have some drawbacks, which seem pretty obvious: you cannot make a summary, sort, or filter if you do not have all records at hand.

蓝眸 2024-07-13 20:39:29

NextGrid 是 Delphi 的轻量、快速且美观的网格

http://www.bergsoft .net/component/next-grid/features.htm

在不降低速度的情况下处理大量细胞

NextGrid 可以处理非常大的数量
细胞而不损失速度。 速度
添加、修改和删除数据
与细胞数量无关。
在 NextGrid 演示中您可以看到有多快
NextGrid 可处理 100,000 行和 10
列 = 1,000,000 个单元格

NextGrid is light, fast and nice looking grid for Delphi

http://www.bergsoft.net/component/next-grid/features.htm

HANDLING LARGE AMOUNT OF CELLS WITHOUT LOOSING SPEED

NextGrid can handle very large amount
of cells without losing speed. Speed
of adding, modifying and deleting data
doesn't depend of the amount of cells.
In NextGrid demo you can see how fast
NextGrid work with 100,000 rows and 10
columns = 1,000,000 cells

不及他 2024-07-13 20:39:29

我认为 DevExpress Quantumgrid 对此支持得很好。

I think the DevExpress Quantumgrid supports this very good.

伴我心暖 2024-07-13 20:39:29

抱歉,我刚刚看到您对 Neftalí 的评论,

如果您每次携带 100 条记录,然后获取下 100 条,这项工作与数据库访问组件相关,请查看 devart 组件,它们是直接提供的访问最常用数据库的组件,它们具有您所询问的功能以及更多功能:

http:// /www.devart.com/products-vcl.html

sorry, I just saw your comment to Neftalí

if you would to bring 100 record per time, and then fetch the next 100, this work related to database access components, look at devart components, they are offer direct access components to most used database, and they have the feature you are asking about and more:

http://www.devart.com/products-vcl.html

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