[performance] Add further indexes to mitigate laggy queries (#586)

* start adding more indexes as a migration

* update sqlite version
This commit is contained in:
tobi 2022-05-18 16:58:26 +02:00 committed by GitHub
commit f4b0d76cd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
236 changed files with 395899 additions and 195070 deletions

View file

@ -10,6 +10,7 @@ package main
import (
"archive/zip"
"bufio"
"flag"
"fmt"
"io"
"io/ioutil"
@ -253,12 +254,12 @@ var (
sz int
dev bool
}{
{sqliteDir, "https://www.sqlite.org/2022/sqlite-amalgamation-3380200.zip", 2457, false},
{sqliteSrcDir, "https://www.sqlite.org/2022/sqlite-src-3380200.zip", 12814, false},
{sqliteDir, "https://www.sqlite.org/2022/sqlite-amalgamation-3380500.zip", 2457, false},
{sqliteSrcDir, "https://www.sqlite.org/2022/sqlite-src-3380500.zip", 12814, false},
}
sqliteDir = filepath.FromSlash("testdata/sqlite-amalgamation-3380200")
sqliteSrcDir = filepath.FromSlash("testdata/sqlite-src-3380200")
sqliteDir = filepath.FromSlash("testdata/sqlite-amalgamation-3380500")
sqliteSrcDir = filepath.FromSlash("testdata/sqlite-src-3380500")
)
func download() {
@ -372,7 +373,12 @@ func fail(s string, args ...interface{}) {
os.Exit(1)
}
var (
oFullPathComments = flag.Bool("full-path-comments", false, "")
)
func main() {
flag.Parse()
fmt.Printf("Running on %s/%s.\n", runtime.GOOS, runtime.GOARCH)
env := os.Getenv("GO_GENERATE")
goarch := runtime.GOARCH
@ -651,6 +657,7 @@ func makeTestfixture(goos, goarch string, more []string) {
fmt.Sprintf("-I%s", sqliteDir),
fmt.Sprintf("-I%s", sqliteSrcDir),
},
otherOpts(),
files,
more,
configTest,
@ -661,6 +668,13 @@ func makeTestfixture(goos, goarch string, more []string) {
}
}
func otherOpts() (r []string) {
if *oFullPathComments {
r = append(r, "-full-path-comments")
}
return r
}
func makeSpeedTest(goos, goarch string, more []string) {
task := ccgo.NewTask(
join(
@ -674,6 +688,7 @@ func makeSpeedTest(goos, goarch string, more []string) {
fmt.Sprintf("-I%s", sqliteDir),
"-l", "modernc.org/sqlite/lib",
},
otherOpts(),
more,
configProduction,
),
@ -698,6 +713,7 @@ func makeMpTest(goos, goarch string, more []string) {
fmt.Sprintf("-I%s", sqliteDir),
"-l", "modernc.org/sqlite/lib",
},
otherOpts(),
more,
configProduction,
),
@ -726,6 +742,7 @@ func makeSqliteProduction(goos, goarch string, more []string) {
"-trace-translation-units",
filepath.Join(sqliteDir, "sqlite3.c"),
},
otherOpts(),
more,
configProduction,
),
@ -755,6 +772,7 @@ func makeSqliteTest(goos, goarch string, more []string) {
volatiles,
filepath.Join(sqliteDir, "sqlite3.c"),
},
otherOpts(),
more,
configTest,
),