有没有办法使用 plpgsql 控制 postgres 中的异步流?
我知道有并行查询,所以语句也可以并行化吗?
DECLARE
JSONB res1
JSONB res2
BEGIN
res1 := select * ...
res2 := func2();
return func3(res1, res2)
END
我希望能够指定对 res1
和 res2
的调用可以在 postgres 本身内并行运行。
答案 0 :(得分:1)
要并行运行两条 SQL 语句,需要两个数据库连接。