Even with this fix #1972 implemented to answer this issue #1935, after updating to v2.2.0 this code still executes sequentially and not concurrently.
console.time("long");
console.time("short");
// This takes 3 seconds
db.select(
"WITH RECURSIVE cte(x) AS (SELECT 1 UNION ALL SELECT x + 1 FROM cte LIMIT 10000000) SELECT count(x) FROM cte;"
).then(() => {
console.timeEnd("long");
});
db.select("SELECT 1;").then(() => {
console.timeEnd("short");
});
[Debug] long: 3395.504ms (Sandbox.tsx, line 38)
[Debug] short: 3395.760ms (Sandbox.tsx, line 41)
Is there something I missed?
cc @cijiugechu