yiisoft/yii — pull request #671 by yktoo (2012-05-03 10:27:58+00:00)
Title: Improve Oracle metadata reading performance

It's a well known issue that reading metadata for Oracle tables is extremely slow and can take minutes.

After a quite simple optimization to COciSchema->findColumns() I managed to reduce time it takes to read in the metadata by about 50%.

For some reason the existing query uses a scalar subquery to determine whether a column belongs to the primary key, which is inefficient compared to an outer join. (https://github.com/yiisoft/yii/issues/632)