Re: Proposal: implement Postgres CLUSTER USING by default for MtM tables

2013-05-22 Thread Donald Stufft
On May 21, 2013, at 9:28 PM, bry...@obviously.com wrote: > The tables created by django for MtM fields are unordered. Loading all the > relationships may result in a number of I/O operations approaching the number > of relationships: > > # select * from basetable; > id |basetable_id| mtm_id

Re: Proposal: implement Postgres CLUSTER USING by default for MtM tables

2013-05-22 Thread Russell Keith-Magee
Hi Bryce, An interesting idea. How are you proposing that this feature be exposed as an API? Is there any reason that this couldn't be handled as a DB-admin operation? i.e., Django just does what it normally does, and if a DB admin notices that table clustering is a problem, they apply the cluste

Proposal: implement Postgres CLUSTER USING by default for MtM tables

2013-05-21 Thread bryce2
The tables created by django for MtM fields are unordered. Loading all the relationships may result in a number of I/O operations approaching the number of relationships: # select * from basetable; id |basetable_id| mtm_id ++-- 6 | 3 |1 7 |