Left Join performance on Spanner

Tomer Peled

We encountered with a disturbing issue. Seems that when we are using left join on the Google Spanner it suffers from bad performance.

The left join operator cause to full scan on the right tables rows from some reason...

Anyone else encountered with this? Of course that when we're removing the left join operator and just using inner join the performance is good...

Execution Plan:

enter image description here

Tomer Peled

So, it appears that we needed to tell the Google Spanner how to conduct the join operation. In our case APPLY_JOIN did the trick: https://cloud.google.com/spanner/docs/query-syntax#join-hints

JOIN@{JOIN_TYPE=APPLY_JOIN}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related