<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 905: High cpu time when showing columns list of a table with oracle 12c</title><link href="https://sourceforge.net/p/tora/bugs/905/" rel="alternate"/><link href="https://sourceforge.net/p/tora/bugs/905/feed.atom" rel="self"/><id>https://sourceforge.net/p/tora/bugs/905/</id><updated>2018-08-23T15:48:43.527000Z</updated><subtitle>Recent changes to 905: High cpu time when showing columns list of a table with oracle 12c</subtitle><entry><title>High cpu time when showing columns list of a table with oracle 12c</title><link href="https://sourceforge.net/p/tora/bugs/905/" rel="alternate"/><published>2018-08-23T15:48:43.527000Z</published><updated>2018-08-23T15:48:43.527000Z</updated><author><name>DESNOS Sylvain</name><uri>https://sourceforge.net/u/desnoss/</uri></author><id>https://sourceforge.net341f960fd211e5fbbc8cdb5b210b66f30e38d8d4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We used Tora for many years to manage our Oracle databases. We are currently migrating them from 11g to 12c. With Oracle 12 databases, we noticed now very bad response time when we want to display the column characteristics of a table. &lt;/p&gt;
&lt;p&gt;We have this issue with any Tora release (included the last 3.2-133); but only with Oracle release 12. Maybe due to its new multi-tenant architecture?&lt;/p&gt;
&lt;p&gt;I traced your SQL request when calling this command (show columns list of a table of a schema). It is something like :&lt;/p&gt;
&lt;p&gt;SELECT DISTINCT cl.column_name as nom,&lt;br/&gt;
                cl.data_type as type,&lt;br/&gt;
                cl.data_length as longueur,&lt;br/&gt;
                cl.data_precision as precision,&lt;br/&gt;
                cl.data_scale as echelle,&lt;br/&gt;
                (SELECT comments FROM all_col_comments cm WHERE cm.owner = cl.owner AND cm.table_name = cl.table_name AND cm.column_name = cl.column_name ) AS "Comment",&lt;br/&gt;
                cl.column_id&lt;br/&gt;
                               FROM all_tab_columns cl&lt;br/&gt;
                WHERE cl.owner =  &amp;amp;1 AND cl.table_name = &amp;amp;2&lt;br/&gt;
                               ORDER BY cl.column_id;&lt;/p&gt;
&lt;p&gt;Best cost and response time would be get with this  :&lt;/p&gt;
&lt;p&gt;SELECT cl.column_name as nom,&lt;br/&gt;
       cl.data_type as type,&lt;br/&gt;
       cl.data_length as longueur,&lt;br/&gt;
       cl.data_precision as precision,&lt;br/&gt;
       cl.data_scale as echelle,&lt;br/&gt;
       cm.comments,&lt;br/&gt;
       cl.column_id&lt;br/&gt;
  FROM user_tab_cols cl&lt;br/&gt;
       left join user_col_comments cm&lt;br/&gt;
         on (cl.table_name = cm.table_name and cl.column_name = cm.column_name)&lt;br/&gt;
  WHERE cl.table_name = &amp;amp;1&lt;br/&gt;
  ORDER BY cl.column_id;&lt;/p&gt;
&lt;p&gt;What do you think about this alternative?&lt;/p&gt;
&lt;p&gt;Thanks in advance for your response&lt;/p&gt;
&lt;p&gt;Sylvain&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>