We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Generate model from Oracle takes too long

Hi all,

I'm using phalcon devtools to generate model from existing Oracle database, but the tool keeps getting stuck at processing the command. Upon looking into the db session from my Oracle SQL Developer, it seems like the tool is scanning the whole structure of the database, which include tables that are internal to Oracle, in order to generate the model. Here is an example of the SQL statement that the tool is querying:

SELECT AC.TABLE_NAME, CC.COLUMN_NAME, AC.CONSTRAINT_NAME, AC.R_OWNER, RCC.TABLE_NAME R_TABLE_NAME, RCC.COLUMN_NAME R_COLUMN_NAME FROM ALL_CONSTRAINTS AC JOIN ALL_CONS_COLUMNS CC ON AC.CONSTRAINT_NAME = CC.CONSTRAINT_NAME JOIN ALL_CONS_COLUMNS RCC ON AC.R_OWNER = RCC.OWNER AND AC.R_CONSTRAINT_NAME = RCC.CONSTRAINT_NAME WHERE AC.CONSTRAINT_TYPE='R' AND AC.OWNER='SWIFT' AND AC.TABLE_NAME = 'EXF$ASUDFLIST'

All those queryings are really unnecessary just to generate a model for a table that I believe has a very simple structure.

Please assist/advice.