Query cost: Global Temporary Tables vs. Collections (Virtual Arrays)

前端 未结 2 581
情歌与酒
情歌与酒 2021-01-24 21:37

I have a query whose results are stored in a GTT (Global Temporary Table) and in a Collection.

Selecting the data from the GTT again, I get a very small cost: 103.

2条回答
  •  遇见更好的自我
    2021-01-24 22:23

    The most important difference between collections and GTT in SQL, is that CBO(cost-based optimizer) has limitations for TABLE function (kokbf$...), for example JPPD doesn't work with TABLE() functions. Some workarounds: http://orasql.org/2019/05/30/workarounds-for-jppd-with-view-and-tablekokbf-xmltable-or-json_table-functions/

提交回复
热议问题