pingcap/tidb

Refine the implementation of `HashJoinExecutor`

Open

#14.466 geöffnet am 14. Jan. 2020

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (6.186 Forks)batch import
help wantedsig/executiontype/enhancement

Repository-Metriken

Stars
 (40.090 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 14T 4h) (346 gemergte PRs in 30 T)

Beschreibung

Feature Request

Is your feature request related to a problem? Please describe:

Now the implementation of TiDB's hash-join executor is rough and after profiling, we found there are some issues can be resolved to get better performance: image

  • not necessary to initialize and reset the baseJoiner.chk if no condition #14902
  • the method joinMatchedProbeSideRow2Chunk uses the method NewIterator4Slice to create a lot of iterators whereas these iterators can be reused. #15423
  • some slices created in GetMatchRowsAndPtrs can be reused. #15423
  • we can try to change the return type of entryStore.get from structs to pointers which may reduce memory copy(but it may cause some GC problems so we need some tests after update).
  • we can try to build the hash table in parallel.

If you have any other ideas, welcome to discuss it with us in our SIG-Exec channel or in this issue by using comments.

Contributor Guide