Ignasi Marimon-Clos

Results 261 comments of Ignasi Marimon-Clos

> We may just make a index on (tag, eventId). Won't that be worse? The cardinality on `tag` is very low compared to the cardinality on `event_id`.

I tried it out. Dropping the PK and using the index on `tag, event_id` doesn't seem to help: ``` shopping-cart=# VACUUM ANALYZE; VACUUM shopping-cart=# explain analyse select x2."ordering", x2."persistence_id", x2."sequence_number",...

hmm I did a backup/restore of the database and I can no longer reproduce these numbers: Execution Time | 1st query (151815-153815) | 2nd query (141815-153815) | 3rd query (15-153815)...

> I did a backup/restore of the database and I can no longer reproduce these numbers: And yet, if I recreate the database organically again I get the results on...

I've slept on this one for a bit and I'd like to push it forward. Maybe what we can do is hide the change behind a config setting (e.g. `akka.persistence.jdbc.experimental.performance.queryByTag.prefer-tag-index...

I think this can be pushed forward as is, then.

> I don't see the same results, or I missed something. > > I created the following (simplified) tables and populated with 3 million rows: There are two steps I...

@patriknw I've observed in some of your query plans your DB spawns multiple workers which makes me suspect we ran the benchmarks over different-sized databases. All I can remember is...

Hi @scand1sk, is this a `playframewwork` issue or is it specific to `play-json`? If the later, I can transfer ths issue to playframework/play-json.

@AlexLaviolette thanks for the super-thorough explanations and tests. If you could provide a reproducer it'd be a great help to narrow down the issue.