I updated to the newest version of reactor (we had been using the old pre-alpha
with some minor tweaks for a while) and regeneration of the project files was
taking an extremely long time (3500 seconds to do all of them). For reference
we use CF mx7 and Oracle 10g. The old version of reactor was more in line with
around 100-150 seconds. I tracked the problem down to the #qFields# query in
readFields() in reactor/data/oracle/ObjectDao.cfc. I rewrote the query and its
now back to around 100sec for generation of all files including the
dictionaries which we didn't have in the old version. I don't know how many of
the readers of this mailing list use Oracle, but this has helped be a bunch.
The new #qFields# is below.
SELECT
col.COLUMN_NAME as name,
CASE
WHEN
colCon.CONSTRAINT_NAME IS NOT NULL THEN 'true'
ELSE 'false'
END as
primaryKey,
/* Oracle has no equivalent to
autoincrement or identity */
'false'
AS "IDENTITY",
CASE
WHEN col.NULLABLE = 'Y' THEN 'true'
ELSE 'false'
END as NULLABLE,
col.DATA_TYPE as
dbDataType,
case
/* 26 is the length of now() in ColdFusion (i.e. {ts
'2006-06-26 13:10:14'})*/
when col.data_type = 'DATE' then 26
/* oracle returns 4000 for clobs which is the length of what
Oracle stores inline in the record. However, oracle can store several gb out of
line. */
when col.data_type in ('CLOB','BLOB') then 20000000
/* Oracle can compress a number in a smaller field so use
precision if available */
else nvl(col.data_precision, col.data_length)
end as length,
col.data_scale as scale,
col.DATA_DEFAULT as
"DEFAULT",
CASE
WHEN updateCol.updatable = 'YES' THEN 'false'
ELSE 'true'
END as readonly
FROM all_tab_columns col LEFT JOIN
all_constraints tabCon
ON col.TABLE_NAME =
tabCon.TABLE_NAME
AND tabCon.CONSTRAINT_TYPE = 'P'
LEFT JOIN all_cons_columns colCon
ON col.COLUMN_NAME =
colCon.COLUMN_NAME
AND col.TABLE_NAME =
colCon.TABLE_NAME
AND colCon.CONSTRAINT_NAME =
tabCon.CONSTRAINT_NAME
LEFT OUTER JOIN all_updatable_columns updateCol
ON updateCol.table_name = col.table_name and
updateCol.column_name = col.column_name
WHERE col.TABLE_NAME =
'ESCALATION_REQUESTS'
and col.owner = 'ABS_PEERS'
Beau Holton
Programmer Analyst
Bright House Networks
________________________________
CONFIDENTIALITY NOTICE: This e-mail may contain information that is privileged,
confidential or otherwise protected from disclosure. If you are not the
intended recipient of this e-mail, please notify the sender immediately by
return e-mail, purge it and do not disseminate or copy it.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --