From: drh <> Date: Fri, 28 Jul 2023 14:20:31 +0000 (+0000) Subject: Enhancements to the JSON performance testing scripts and instructions to X-Git-Tag: version-3.43.0~101 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a056d486f71aad7df110737b26d38d1bc1ed26e;p=thirdparty%2Fsqlite.git Enhancements to the JSON performance testing scripts and instructions to cover the recent optimizations involving updates to large JSON strings that indexed. FossilOrigin-Name: f9213289d09adfb0461d9644e80c7e889f4bae51563ae2e575a2c95336052bcb --- diff --git a/manifest b/manifest index 03b960da65..bd4c3e8b62 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C JSON\sperformance\simprovements:\s\s(1)\sAdd\sa\scache\sfor\slarge\sstring\svalues\non\sOP_Column\sto\savoid\shaving\sto\sextract\sthe\sstring\smultiple\stimes.\n(2)\sInternal\sJSON\scaching\simprovements. -D 2023-07-28T13:52:08.133 +C Enhancements\sto\sthe\sJSON\sperformance\stesting\sscripts\sand\sinstructions\sto\ncover\sthe\srecent\soptimizations\sinvolving\supdates\sto\slarge\sJSON\sstrings\nthat\sindexed. +D 2023-07-28T14:20:31.825 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1228,9 +1228,9 @@ F test/journal3.test 7c3cf23ffc77db06601c1fcfc9743de8441cb77db9d1aa931863d94f5ff F test/jrnlmode.test 9b5bc01dac22223cb60ec2d5f97acf568d73820794386de5634dcadbea9e1946 F test/jrnlmode2.test 8759a1d4657c064637f8b079592651530db738419e1d649c6df7048cd724363d F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa -F test/json/README.md 0992b8ccbecd8424b84c1173f9ac56bcc0ae96d49912fd2d86c04eb1f3cba7af +F test/json/README.md 3761f858e8069d006d9d863fee523f1cfaac5dd7181b196e16cabb6565bfe530 F test/json/json-generator.tcl dc0dd0f393800c98658fc4c47eaa6af29d4e17527380cd28656fb261bddc8a3f -F test/json/json-q1.txt 335a7c8ab291d354f33b7decc9559e99a2823d4142291c4be7aa339a631f3c2d +F test/json/json-q1.txt 65f9d1cdcc4cffa9823fb73ed936aae5658700cd001fde448f68bfb91c807307 F test/json/json-speed-check.sh 8b7babf530faa58bd59d6d362cec8e9036a68c5457ff46f3b1f1511d21af6737 x F test/json101.test 94126d4291d4a00e45f6988ce885c410de69243490e46e70e9946cb6e6f9ea02 F test/json102.test 13dc9e7b7f359ecb861e02f9bd7019f7342a63d1c354273b0a8f3904050560a8 @@ -2049,9 +2049,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 2a3f3a9cf28849c99d83c256f813405a2f47f84532e1192d67bb7aa655dd98a3 8fd06d1151c521515d9f7181575a04e451b522335135a27248052b067d4005ae -R c22600634c62262906bbc544e7e5c805 -T +closed 8fd06d1151c521515d9f7181575a04e451b522335135a27248052b067d4005ae +P 771fe35074b50b8d4a6583e61c53871b2445f7a58c82f3fc3bf6776e562e63af +R 77beac32848c1c5c4f785514dd4faeff U drh -Z 8d623546c0abbe473f1746e112ae16b4 +Z 2c88551e17349d1f41ec2f4976d62002 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 8ee91ce04e..56a5471731 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -771fe35074b50b8d4a6583e61c53871b2445f7a58c82f3fc3bf6776e562e63af \ No newline at end of file +f9213289d09adfb0461d9644e80c7e889f4bae51563ae2e575a2c95336052bcb \ No newline at end of file diff --git a/test/json/README.md b/test/json/README.md index a100287b05..217b232eee 100644 --- a/test/json/README.md +++ b/test/json/README.md @@ -16,14 +16,14 @@ of the SQLite JSON parser. 2. Build the baseline sqlite3.c file. ("`make sqlite3.c`") - 3. Run "`sh json-speed-check-1.sh trunk`". This creates the baseline + 3. Run "`sh json-speed-check.sh trunk`". This creates the baseline profile in "jout-trunk.txt". # 3.0 Testing 1. Build the sqlite3.c to be tested. - 2. Run "`sh json-speed-check-1.sh x1`". The profile output will appear + 2. Run "`sh json-speed-check.sh x1`". The profile output will appear in jout-x1.txt. Substitute any label you want in place of "x1". 3. Run the script shown below in the CLI. diff --git a/test/json/json-q1.txt b/test/json/json-q1.txt index 0395f0c061..d122a2d826 100644 --- a/test/json/json-q1.txt +++ b/test/json/json-q1.txt @@ -2,3 +2,23 @@ .timer on .param set $label 'q87' SELECT rowid, x->>$label FROM data1 WHERE x->>$label IS NOT NULL; + +CREATE TEMP TABLE t2(x JSON TEXT); +WITH RECURSIVE + c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<25000), + array1(y) AS ( + SELECT json_group_array( + json_object('x',x,'y',random(),'z',hex(randomblob(50))) + ) + FROM c + ), + c2(n) AS (VALUES(1) UNION ALL SELECT n+1 FROM c2 WHERE n<5) +INSERT INTO t2(x) + SELECT json_object('a',n,'b',n*2,'c',y,'d',3,'e',5,'f',6) FROM array1, c2; +CREATE INDEX t2x1 ON t2(x->>'a'); +CREATE INDEX t2x2 ON t2(x->>'b'); +CREATE INDEX t2x3 ON t2(x->>'e'); +CREATE INDEX t2x4 ON t2(x->>'f'); +UPDATE t2 SET x=json_replace(x,'$.f',(x->>'f')+1); +UPDATE t2 SET x=json_set(x,'$.e',(x->>'f')-1); +UPDATE t2 SET x=json_remove(x,'$.d');