Anton Shestakov <av6@dwimlabs.net>, Sun, 24 Sep 2017 12:25:05 +0800
viewer: use subqueries to get data on index page
Before, there were bare columns in the aggregate query, their values were
undefined (but it somehow worked), as SQLite docs say. Good news is that now
this bigger query uses (project_id, ordinal) index and is really fast.
static/mascot-cat.svg
Permissions: -rw-r--r--
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1119.6518 628.88721"
<dc:format>image/svg+xml</dc:format>
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
transform="translate(-265.88839,-185.61699)"
style="fill:#faa732;fill-opacity:1;stroke:none"
d="m 621.14226,185.62224 c -2.7014,0.11529 -5.13526,1.80962 -6.95412,3.6687 -53.49733,54.68085 -191.84185,383.22992 -146.09116,625.21327 l 715.23342,0 c 45.7507,-241.98335 -92.5939,-570.53242 -146.0912,-625.21327 -1.8188,-1.85908 -4.2527,-3.55341 -6.9541,-3.6687 -0.1801,-0.007 -0.3654,-0.007 -0.5476,0 -2.2674,0.082 -4.7098,1.32367 -7.0636,4.4353 -24.72117,32.68 -30.19314,66.96286 -40.57478,100.75252 -44.39028,-11.98477 -98.26425,-19.05537 -156.38544,-19.05537 -58.12119,0 -111.99515,7.0706 -156.38543,19.05537 -10.38165,-33.78966 -15.85361,-68.07252 -40.5748,-100.75252 -2.35382,-3.11163 -4.79615,-4.35335 -7.06362,-4.4353 -0.1822,-0.007 -0.36746,-0.007 -0.54757,0 z"
d="m 298.26187,608.10261 331.7144,83.81041"
style="fill:none;stroke:#000000;stroke-width:14.01774216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
d="M 619.88311,721.0318 272.99708,719.98001"
style="fill:none;stroke:#000000;stroke-width:14.01774216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
d="M 624.4038,752.39496 302.48771,804.48627"
style="fill:none;stroke:#000000;stroke-width:14.01774216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#000000;stroke-width:14.01774216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 1353.1667,608.10261 -331.7144,83.81041"
style="fill:none;stroke:#000000;stroke-width:14.01774216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 1031.5454,721.0318 346.8861,-1.05179"
style="fill:none;stroke:#000000;stroke-width:14.01774216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 1027.0247,752.39496 321.9161,52.09131"
d="m 657.11748,432.95873 c -62.21139,0 -112.63475,50.42334 -112.63475,112.63475 0,62.21139 50.42336,112.68951 112.63475,112.68951 62.21139,0 112.63475,-50.47812 112.63475,-112.68951 0,-62.21141 -50.42336,-112.63475 -112.63475,-112.63475 z"
style="fill:#ffffff;fill-opacity:1;stroke:none" />
d="m 994.30989,432.95873 c -62.21139,0 -112.63475,50.42334 -112.63475,112.63475 0,62.21139 50.42336,112.68951 112.63475,112.68951 62.21141,0 112.63471,-50.47812 112.63471,-112.68951 0,-62.21141 -50.4233,-112.63475 -112.63471,-112.63475 z"
style="fill:#ffffff;fill-opacity:1;stroke:none" />
d="m 657.11748,487.387 c 32.16371,0 58.20648,26.04277 58.20648,58.20648 0,32.16371 -26.04277,58.26124 -58.20648,58.26124 -32.16371,0 -58.26124,-26.09753 -58.26124,-58.26124 0,-32.16371 26.09753,-58.20648 58.26124,-58.20648 z"
style="fill:#000000;fill-opacity:1;stroke:none" />
d="m 994.30989,487.387 c 32.16371,0 58.26121,26.04277 58.26121,58.20648 0,32.16371 -26.0975,58.26124 -58.26121,58.26124 -32.16371,0 -58.20649,-26.09753 -58.20649,-58.26124 0,-32.16371 26.04278,-58.20648 58.20649,-58.20648 z"
style="fill:#000000;fill-opacity:1;stroke:none" />
d="m 824.07098,646.78406 c -7.37463,0.14981 -37.23964,1.58693 -42.92934,14.56531 -11.50552,26.24445 36.66535,96.46413 44.57204,94.61976 7.90669,1.84437 56.07756,-68.37531 44.57204,-94.61976 -6.50251,-14.83244 -44.57204,-14.56531 -44.57204,-14.56531 0,0 -0.58918,-0.0214 -1.6427,0 z"
style="fill:#da314b;fill-opacity:1;stroke:none" />