[sqlite] First test of json and index expressions, not so good

2015-09-05 Thread Domingo Alvarez Duarte
Hello ! Yes it is but I discover later some flaws on my assumptions look at further on this thread to see the end result. Cheers ! > Sat Sep 05 2015 2:03:40 pm CEST CEST from "Luiz Am?rico" > Subject: Re: [sqlite] First test of json and index >expressions, not so good > > Em 04/09/2015

[sqlite] First test of json and index expressions, not so good

2015-09-05 Thread Richard Hipp
On 9/5/15, Luiz Am?rico wrote: > > Just for information > > Is json_extract from https://github.com/groner/sqlite-json ? > No. The json_extract() function at https://www.sqlite.org/src/artifact/bd51e8c1?ln=1155-1191 is a completely original implementation written by me. I did not reference or

[sqlite] First test of json and index expressions, not so good

2015-09-05 Thread Luiz Américo
Em 04/09/2015 17:09, "Domingo Alvarez Duarte" escreveu: > > Hello ! > > This is my first test with json and index expressions ! > > How to make usage of the expression index on queries ? > > Why is json_extract so slow ? Just for information Is json_extract from

[sqlite] First test of json and index expressions, not so good

2015-09-04 Thread Domingo Alvarez Duarte
Hello again ! Well it's slow partly because of the linear scan but there are not too many records 5000. I also tried with "indexed by" but: ___ sql = "select? json_extract(json, '$.value') AS val? from json_tbl indexed by json_tbl_idx where val = ?;"; showPlan(); ? AN ERROR

[sqlite] First test of json and index expressions, not so good

2015-09-04 Thread Domingo Alvarez Duarte
Hello ! Here is the database dump with 50 records: PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE json_tbl(id integer primary key, json text collate nocase); INSERT INTO "json_tbl" VALUES(1,'{"id" : 1, "value" : "the_value_1"}'); INSERT INTO "json_tbl" VALUES(2,'{"id" : 2, "value"

[sqlite] First test of json and index expressions, not so good

2015-09-04 Thread Domingo Alvarez Duarte
Hello ! This is my first test with json and index expressions ! How to make usage of the expression index on queries ? Why is json_extract so slow ? Cheers ! Output Time to insert??? 5000??? 0.032227??? records by second = ??? 155149 count=??? 4999 json=??? the_value_1