2
votes

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

1
Can you paste the results of the Query Execution plan for the left join query, which is available in the Cloud Spanner web console when you run your query? See cloud.google.com/spanner/docs/…eb80
Added the execution planTomer Peled

1 Answers

2
votes

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}