From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Wells Oliver <wells(dot)oliver(at)gmail(dot)com> |
Cc: | Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Very slow 101-feeling design/query.. |
Date: | 2021-12-11 02:56:53 |
Message-ID: | 13148.1639191413@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Wells Oliver <wells(dot)oliver(at)gmail(dot)com> writes:
> PG 13.4. Can't quite run the EXPLAIN ANALYZE since it takes so long, but
> EXPLAIN SELECT DISTINCT game_id FROM vw_joints shows (s = joints, p = plays)
I doubt you're going to get a query plan that's significantly better
than what you show here. But those tables are pretty large, so
I wonder whether you have cranked up work_mem.
One potential issue is that the planner thinks there are only
about 1829 distinct game_id values:
> HashAggregate (cost=63810150.11..63810168.40 rows=1829 width=4)
> Group Key: p.game_id
Is that about the right size of result for this?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Rui DeSousa | 2021-12-11 04:18:14 | Re: Very slow 101-feeling design/query.. |
Previous Message | Ron | 2021-12-11 00:21:11 | Re: Very slow 101-feeling design/query.. |