本文介绍了看MySQL的变化表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了从每n个时间点或类似的时间点选择之外,还有更好的方法来监视表中的新条目吗?

Is there a better way to watch for new entries in a table besides selecting from it every n ticks of time or something like that?

我有一个表外部程序更新频率很高,客户端可以在到达时监视这些新数据,我如何在不必设置固定周期的可重复选择语句?

I have a table that an external program updates very often, and clients can watch for this new data as it arrive, how can I make that without having to set a fixed period of repeatable select statements?

推荐答案

在MySQL中,没有最好的方式比轮询(你创建一个特定的表来简化轮询虽然),在其他数据库中,你可以有触发器对数据库以外的影响。在MySQL中只能在数据库本身内执行操作实例,填充帮助器表)。

In MySQL there's no best way than to poll (you create a specific table to simplify the polling though), in other databases you can have triggers that have impact outside the database. In MySQL triggers can only do stuff inside the database itself (for instance, populating the helper table).

这篇关于看MySQL的变化表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 04:17