Sample Header Ad - 728x90

Postgres Citus error "complex joins are only supported when all distributed tables are joined on their distribution columns with equal operator"

1 vote
0 answers
1330 views
I have two tables defined as distributed in Citus based on the same field:
select create_distributed_table('gedi','clould_metadata_id');
select create_distributed_table('cloud_metadata','clould_metadata_id');
The clould_metadata_id is unique in cloud_metadata, gedi table stores millions of records, cloud_metadata stores around 3000. When I try to inner join those tables using:
select * from cloud_metadata cm 
inner join gedi g 
on cm.clould_metadata_id = g.clould_metadata_id
I get the error message "SQL Error [0A000]: ERROR: complex joins are only supported when all distributed tables are joined on their distribution columns with equal operator". I believe that's precisely what I'm trying to do, join those tables using de distribution columns, so what I'm doing wrong?
Asked by Mauro Assis (111 rep)
Sep 26, 2021, 01:17 PM
Last activity: Mar 3, 2025, 07:04 AM