Re: Merge David and Goliath tables efficiently

2023-06-20 Thread Tomas Vondra
On 6/20/23 12:02, nicolas paris wrote: >... > > Definitely this makes sense to add the part_col in the join columns. > Also it helps the planner to choose a better plan, since now it goes > with per partition nested loop without having to trick the costs > (either enable_hashjoin/random_page_cost),

Re: Merge David and Goliath tables efficiently

2023-06-20 Thread nicolas paris
> This is absolutely expected. If you partition by hash (id, part_key), > you can't join on (id) and expect partitionwise join to work. To > quote > the enable_partitionwise_join documentation [1]: > >     Enables or disables the query planner's use of partitionwise > join, >     which allows a jo

Re: Index on (fixed size) bytea value

2023-06-20 Thread Les
> > > Then you would ALTER the column and SET STORAGE MAIN, so that it does not > ever use TOAST. > > The size limit for a row would then be 8kB minus page header minus row > header, which > should be somewhere in the vicinity of 8140 bytes. > > If you want your block size to be a power of two, the