Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Alias columns names have been changed by hibernate

Carlos Salheb JrJul 11 2024 — edited Jul 11 2024

Hi,

Sometimes the alias columns names from application queries have been changed by Hibernate.

This issue changes the SQL ID from the same queries to another SQL ID, it's a normal behavior. Because of that SQL profiles created before isn't able to be used by the query anymore and it is needed to create a new SQL Profile. Also the time to monitor a query is limited by that SQL ID change.

It isn't possible to ignore the alias in the queries, like as done with bind variables.

Searching about the hibernate behavior, it says that alias columns names are changed to improve performance, but at the database side it may decrease its performance, as noticed.

Follows a query exemple that has this issue:

SELECT
this_.id AS id1175_0_,
this_.alerta_prazo AS alerta2_1175_0_,
this_.anexo AS anexo1175_0_,
this_.apenso AS apenso1175_0_,
this_.arquivado AS arquivado1175_0_,
this_.assunto AS assunto1175_0_,
this_.boo_afastamento AS boo7_1175_0_,
this_.boo_bagagem AS boo8_1175_0_,
this_.boo_carro_oficial AS boo9_1175_0_,
...

The same query one month ago:

SELECT
this_.id AS id1202_0_,
this_.alerta_prazo AS alerta2_1202_0_,
this_.anexo AS anexo1202_0_,
this_.apenso AS apenso1202_0_,
this_.arquivado AS arquivado1202_0_,
this_.assunto AS assunto1202_0_,
this_.boo_afastamento AS boo7_1202_0_,
this_.boo_bagagem AS boo8_1202_0_,
this_.boo_carro_oficial AS boo9_1202_0_,

Comments
Post Details
Added on Jul 11 2024
2 comments
391 views