Re: [sqlite] SQLite 3.26.0 recursive CTE performance regression

2018-12-24 Thread Sebastian Bank
Am 24.12.2018 um 13:12 schrieb Richard Hipp: There are now enhancements on a branch (https://www.sqlite.org/src/timeline?r=reuse-subqueries) that should fix your performance problem. Since you seem to be someone who writes intense SQL, it would be really cool if you could try out that branch

Re: [sqlite] SQLite 3.26.0 recursive CTE performance regression

2018-12-24 Thread Richard Hipp
On 12/22/18, Sebastian Bank wrote: > > given a table that represents an adjacency tree, I use a recursive CTE > together with group_concat() to generate the path for each tree item. > > With SQLite up to version 3.25.3 the query below (with the 500 example > items inserted below) takes about 0.2

Re: [sqlite] SQLite 3.26.0 recursive CTE performance regression

2018-12-22 Thread Keith Medcalf
Time: real 0.007 user 0.00 sys 0.00 --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Jake Thaw &

Re: [sqlite] SQLite 3.26.0 recursive CTE performance regression

2018-12-22 Thread Jake Thaw
Hi Sebastian, You can achieve better performance by constructing the path as you walk the tree. e.g. WITH tree( id, depth, path ) AS ( SELECT id, 1, id FROM languoid WHERE parent_id IS NULL UNION ALL SELECT l.id, t.depth+1, t.path || '/' || l.id FROM tree

Re: [sqlite] SQLite 3.26.0 recursive CTE performance regression

2018-12-22 Thread Richard Hipp
On 12/22/18, Sebastian Bank wrote: > > With SQLite up to version 3.25.3 the query below (with the 500 example > items inserted below) takes about 0.2 seconds on my system. With version > 3.26.0 it takes over 6 seconds (with the full data set of around 24000 > items, it seems to become

[sqlite] SQLite 3.26.0 recursive CTE performance regression

2018-12-22 Thread Sebastian Bank
Hi, given a table that represents an adjacency tree, I use a recursive CTE together with group_concat() to generate the path for each tree item. With SQLite up to version 3.25.3 the query below (with the 500 example items inserted below) takes about 0.2 seconds on my system. With version