<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged indexes</title>
<link>https://overflow.efficy.io/?qa=tag/indexes</link>
<description>Powered by Question2Answer</description>
<item>
<title>indexes : SYS_CHANGED_CHRONOS vs SYS_CHANGED_CHRONOS2 performances</title>
<link>https://overflow.efficy.io/?qa=4939/syschangedchronos-syschangedchronos2-performances</link>
<description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;before giving the context and my observations, here is my question : for what kind of queries the SYS&amp;#95;CHANGED&amp;#95;CHRONOS and SYS&amp;#95;CHANGED&amp;#95;CHRONOS2 indexes are created ?&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Yesterday, I observed that the chronos detail was really slow to load.&lt;/p&gt;

&lt;p&gt;In the query logs, the chronos detail has generated one query per selected entity (chronos detail options).&lt;br&gt;
The idea is to get the primary key of each entity linked to the entity.&lt;br&gt;
There is no other query in the logs about chronos detail.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;So, I guess, but I can’t confirm it without proof, that the primary keys from the previous queries are used by the following SYS&amp;#95;CHANGED queries :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select K_TABLE, D_CHANGE, USERNAME, OPERATION, K_1, K_2, K_3, MILLI,
&quot;COMMENT&quot; from &quot;GERM&quot;.&quot;SYS_CHANGED&quot; where ((K_1 = :key and K_TABLE in
(:param1)) or (K_2 = :key and K_TABLE in (:param2, :param3, :param4)))
and (D_CHANGE &amp;gt;= :mindate) and (D_CHANGE &amp;lt; :maxdate) order by D_CHANGE,
K_TABLE, K_2, MILLI, OPERATION;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;

&lt;pre&gt;&lt;code&gt;select distinct USERNAME, D_CHANGE from &quot;GERM&quot;.&quot;SYS_CHANGED&quot; where
((K_1 = :key and K_TABLE in (:param1)) or (K_2 = :key and K_TABLE in
(:param2, :param3, :param4))) and (D_CHANGE &amp;gt;= :mindate) and (D_CHANGE
&amp;lt; :maxdate) order by D_CHANGE DESC;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Each of these queries exists in a lot of versions because of a variation in the number of parameters for K&amp;#95;TABLE field.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;When I consult the execution plan of the above queries (Oracle - SQL Developer), I observe that the first one is using SYS&amp;#95;CHANGED_CHRONOS (K&amp;#95;2, K&amp;#95;TABLE, D&amp;#95;CHANGE, USERNAME) index and the second one, SYS&amp;#95;CHANGED&amp;#95;CHRONOS2 (D&amp;#95;CHANGE, K&amp;#95;TABLE, K&amp;#95;1, K&amp;#95;2) index.&lt;br&gt;
For each query, I can consult the execution plan with SYS&amp;#95;CHANGED&amp;#95;CHRONOS or SYS&amp;#95;CHANGED&amp;#95;CHRONOS2 index.&lt;br&gt;
The cost is almost the same between these two indexes. So, the choice between them seems to be a really complicated choice for Oracle.&lt;br&gt;
In the database, SYS&amp;#95;CHANGED&amp;#95;CHRONOS is better in a lot of situations.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;So, for what kind of queries the SYS&amp;#95;CHANGED&amp;#95;CHRONOS and SYS&amp;#95;CHANGED&amp;#95;CHRONOS2 indexes are created ?&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;KR,&lt;/p&gt;

&lt;p&gt;Eric&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4939/syschangedchronos-syschangedchronos2-performances</guid>
<pubDate>Tue, 22 Oct 2019 09:38:06 +0000</pubDate>
</item>
<item>
<title>Create new indexes in tables</title>
<link>https://overflow.efficy.io/?qa=4408/create-new-indexes-in-tables</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Last Friday, I created several Indexes on different tables. Indeed, we need those indexes to optimize the matching on the customer ID during the datasync and when the customer uses the API.&lt;br&gt;
Today all those indexes have disappeared. What's happen between last Friday and today? An upgrade DB was launched. It seems this action destroys those customs indexes.&lt;br&gt;
Is it the standard behavior? If it is, how to create custom indexes that are not destroy on each db upgrade?&lt;/p&gt;

&lt;p&gt;thanks for the help,&lt;/p&gt;

&lt;p&gt;Laurent&lt;/p&gt;

&lt;p&gt;PS: the &quot;Tools&quot; option into the dbeditor didn't exist anymore into Efficy11.x&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4408/create-new-indexes-in-tables</guid>
<pubDate>Wed, 05 Jun 2019 07:31:51 +0000</pubDate>
</item>
<item>
<title>DBEditor new functionnality : Indexes</title>
<link>https://overflow.efficy.io/?qa=1220/dbeditor-new-functionnality-indexes</link>
<description>&lt;p&gt;From Efficy 2014 R6640 in the DBEditor there is a new tool to add compute additional indexes to speed-up list queries, also for custom entities. &lt;/p&gt;

&lt;p&gt;Is it about Database Native Indexes? Where is it? How this is working?&lt;/p&gt;

&lt;p&gt;Can we have more information of indexes which have been put in place to improve search performance?&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1220/dbeditor-new-functionnality-indexes</guid>
<pubDate>Mon, 18 Jan 2016 09:29:20 +0000</pubDate>
</item>
</channel>
</rss>