Timeline for Slow COUNT DISTINCT on a large table in PostgreSQL
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 19, 2023 at 20:12 | answer | added | jjanes | timeline score: 0 | |
Jul 19, 2023 at 17:59 | comment | added | jjanes | Your partitioning scheme is not behaving as expected. Why is mdr_querystats_part_oct, for example, being scanned at all, rather than being ruled out at planning time? Maybe you also have more partitions that were ruled out, we can't know that just from the plan. | |
Jul 19, 2023 at 17:15 | comment | added | jjanes | Your plan seems internally inconsistent. How can the Parallel Append find only 342809 rows when the total of the children nodes is 1.2M? Maybe it is something to do with how the rows get distributed over the parallel workers? Could you repeat with max_parallel_workers_per_gather set to zero? | |
Jul 19, 2023 at 13:54 | comment | added | jjanes | @LaurenzAlbe I guess you can, provided you spell them correctly :) | |
Jul 19, 2023 at 11:46 | comment | added | BigSmoke | You may find that this kind of time-series data will be more efficient to query when you use the TimescaleDB extension. | |
Jul 19, 2023 at 7:50 | comment | added | drew458 | @jjanes I added the informations you mentioned (Postgres version is 14). Also there was a typo in the query aliases, sorry! | |
Jul 19, 2023 at 7:49 | history | edited | drew458 | CC BY-SA 4.0 |
added 11893 characters in body
|
Jul 19, 2023 at 7:46 | history | edited | drew458 | CC BY-SA 4.0 |
added 6 characters in body
|
Jul 19, 2023 at 7:02 | comment | added | Laurenz Albe |
@jjanes Why can't you use aliases in the ORDER BY clause?
|
|
Jul 18, 2023 at 15:20 | history | edited | drew458 | CC BY-SA 4.0 |
deleted 1 character in body
|
Jul 18, 2023 at 14:52 | history | edited | drew458 | CC BY-SA 4.0 |
added 1 character in body
|
Jul 18, 2023 at 14:51 | history | edited | drew458 | CC BY-SA 4.0 |
deleted 1 character in body
|
S Jul 18, 2023 at 14:51 | review | First questions | |||
Jul 18, 2023 at 19:52 | |||||
S Jul 18, 2023 at 14:51 | history | asked | drew458 | CC BY-SA 4.0 |