roed314 / lmfdb_postgres

Issue tracker for the transition of the LMFDB from Mongo to Postgres
Other
0 stars 0 forks source link

Slow queries #25

Open roed314 opened 6 years ago

roed314 commented 6 years ago

We're now logging slow queries, and can address them by adding appropriate indexes. This issue is for tracking slow queries. Add a comment for each one, ideally by giving the command that is slow to execute.

edgarcosta commented 6 years ago
NFO:nf_fields@2018-07-09 18:28:00,787: SELECT "label", "coeffs", "degree", "r2", "cm", "iso_number", "disc_abs", "disc_sign", "disc_rad", "ramps", "galt", "class_number", "class_group", "used_grh" FROM "nf_fields" WHERE "degree" = 2 ORDER BY "degree", "disc_abs", "disc_sign", "iso_number" LIMIT 1000 ran in 1.44792699814s [db_backend.py:163]
edgarcosta commented 6 years ago
roed314 commented 6 years ago

db.av_fqisog.search({'slps': {'$contains': ['0A', '1A']}}, 1, 50, 0)

roed314 commented 6 years ago

db.ec_curves.search({'sha': {'$gte': 2}, 'rank': 2}, 1, 100, 0)

roed314 commented 6 years ago

GIN queries with large number of results (e.g. set of ramified primes contains 2 on number fields)

roed314 commented 6 years ago

number field ramified primes 11 and 13.

roed314 commented 6 years ago

number field ramified primes subset of 2

edgarcosta commented 6 years ago

http://web.lmfdb.xyz/Variety/Abelian/Fq/?start=0&count=50&newton_polygon=%5B0%2C0%2C1%2F2%5D&simple_quantifier=contained&simple_factors=1.2.b vs http://dev.lmfdb.xyz/Variety/Abelian/Fq/?start=0&count=50&newton_polygon=%5B0%2C0%2C1%2F2%5D&simple_quantifier=contained&simple_factors=1.2.b

ps: http://legendre.mit.edu/munin/PostgreSQL/proddb/memory.html