Re: JSON_EACH + recursive query = unexpected performance degradation

David Raymond <[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <VI1PR07MB602963C8EDA336E7D367E74D871B0@VI1PR07MB6029.eurprd07.prod.outlook.com>
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.


-----Original Message-----
From: sqlite-users <[email protected]> On Behalf Of ???????? ?????
Sent: Tuesday, February 11, 2020 1:28 AM
To: [email protected]
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 
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 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 (200-300 TIMES faster).


I attached both queries(don't require schema to run)

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.