Re: [sqlite] JSON_EACH + recursive query = unexpected performance degradation

2020-02-12 Thread Warren Young
On Feb 12, 2020, at 10:53 AM, Jens Alfke wrote: > > You should be able to speed this up by creating temporary tables from the > JSON first, and then changing the CTE to use those tables. Do you not get the same effect by using the new generated columns feature, only without the manual work of

Re: [sqlite] JSON_EACH + recursive query = unexpected performance degradation

2020-02-12 Thread Keith Medcalf
t;."value" AS "id", -- 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 On >Behalf Of ? >Sent: Monday, 10 February, 2020 23:28 >To: s

Re: [sqlite] JSON_EACH + recursive query = unexpected performance degradation

2020-02-12 Thread Jens Alfke
> On Feb 10, 2020, at 10:27 PM, Хусаинов Динар > wrote: > > Problem: the query takes 3000 ms (3 seconds) on my machine to complete. If I > create a real table with the SAME structure, insert the SAME data into it, > and run the SAME query, get the SAME result back, it takes 10-15 ms

Re: [sqlite] JSON_EACH + recursive query = unexpected performance degradation

2020-02-12 Thread Richard Hipp
On 2/12/20, David Raymond wrote: > Not necessarily related to the question itself, but how did the attachments > actually come through with this mail? Every single other person to try and > attach something to this list has had it stripped off. Sometimes Mailman asks me for approval for messages

Re: [sqlite] JSON_EACH + recursive query = unexpected performance degradation

2020-02-12 Thread David Raymond
: Tuesday, February 11, 2020 1:28 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] JSON_EACH + recursive query = unexpected performance degradation I have a dataset of about 300 rows which have parent-child relations. Due to factors unrelated to the issue I build the rows by zipping JSON

[sqlite] JSON_EACH + recursive query = unexpected performance degradation

2020-02-12 Thread Хусаинов Динар
I have a dataset of about 300 rows which have parent-child relations. Due to factors unrelated to the issue I build the rows by zipping JSON arrays with values from each column. Then I run a simplest recursive query on it to get the whole tree(ends up being ~4 levels). Problem: the query