[英]Difference between share table and share streamTable?
In DolphinDB, a shared streamTable can be used in streaming subscription scenarios whereas a shared table cannot.在 DolphinDB 中,共享streamTable可以用于流式订阅场景,而共享表则不能。 So why do we still share the regular table ?
那么为什么我们仍然共享普通表呢? What is it that the shared tables can do while the shared streamTables cannot?
共享表可以做什么而共享流表不能做什么?
Both types of shared tables can be used across sessions.两种类型的共享表都可以跨会话使用。 A shared streamTable can be subscribed while a shared table cannot, like you said.
共享的 streamTable 可以订阅,而共享的表不能,就像你说的那样。
However, the data of a shared streamTable cannot be updated or deleted whereas shared table can.但是,无法更新或删除共享流表的数据,而共享表可以。 Check this:
检查这个:
share table(1 2 3 as id, 4 5 6 as value) as table1;
go;
update table1 set id = 7; // success
delete from table1; // success
share streamTable(1 2 3 as id, 4 5 6 as value) as table2;
go;
update table2 set id = 7 ; // update table2 set id = 7 => The table is not allowed to be updated.
delete from table2; // delete from table2 => It is not allowed to delete rows from the specified table.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.