Closed adrianboangiu closed 10 months ago
Hi Adrian,
First off, thanks for the very detailed test case, much appreciated.
I was a little bit surprised to see that the column sizes are expressed in BYTE. I expected sizes 4 times smaller without BYTE/CHAR or with CHAR.
That's probably because of your session NLS_LENGTH_SEMANTICS when creating the view.
select value from nls_session_parameters where parameter = 'NLS_LENGTH_SEMANTICS';
If it's CHAR, before loading the data dictionary, Oracle first converts the specified length to BYTE unit using the max byte size of the DB charset (most likely AL32UTF8) as factor.
About the main issue,
Am I doing something wrong ? Can you help me to overcome the problem?
I think you're hitting yet another optimizer bug related to ODCI data source. Very often, preventing view merging solves the problem :
SELECT /*+ no_merge(mes) */
mdata.MENU_NAME
, mdata.MENU_TYPE
, mdata.PARENT_MENU
, mdata.SYSTEM_MENU
, mdata.MENU_LEVEL
, mes.MESSAGE
FROM V_MENU_DATA mdata
, V_MESSAGE mes
WHERE mdata.MENU_NAME = mes.KEY
AND mes.BUNDLE = 'MenuStructureBundle';
Closing the issue.
Hello, I was using extensively ExcelTable to manipulate some text files as Oracle views. I discover recently that performing a join with such view does not work always as expected. I don’t know if I face a limit of ExcelTable or some bug (in ExcelTable or maybe in Oracle). I work with Oracle 19.3.0 and ExcelTable 5.0 version. The database nls_length_semantics. Hereafter, an example to understand the problem. I have defined the following view based on the file messages.txt placed into a folder named TRAD (the zip file attached contains the definition of all the objects and the files necessary to create the test case) excel_table.zip
The resulting view columns are:
I was a little bit surprised to see that the column sizes are expressed in BYTE. I expected sizes 4 times smaller without BYTE/CHAR or with CHAR. The view has around 15900 rows and is working well. Hereafter, a query on the view and its result (that will help to show afterwards the problem encountered).
The results are correct.
I have problems when I join the view V_MESSAGE with another one, V_MENU_DATA. This view is presenting data from the table REM_MODULE in a hierarchical way. Here are the columns of the V_MENU_DATA view:
and those of the table REM_MODULE:
The V_MENU_DATA view has around 3600 rows and is working well. Hereafter, a query on the view and its result (that will help to show afterwards the problem encountered).
And now the query performing the join (and a variant of it) that does not work:
Hereafter the result. The results are obviously wrong for the message column (coming from the view based on ExcelTable). 3 times the same value throughout the whole result set!!!
I observed that the results are correct if I join the V_MESSAGE view with the REM_MODULE table
Am I doing something wrong ? Can you help me to overcome the problem?
Thank you very much, Adrian Boangiu