Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3316

Re: select query taking long on covp view

$
0
0

I would try this and run a SQL trace to analyze more.

 

1. I will put KOKRS as the first field in WHERE clause as KOKRS is the key field(And the first field) for both COEP and COBK. At lest it will give a chance to the optimizer to use an index range scan. Also since KOKRS are normally very less for a system and it will surely have an impact as the probability to get an hit is high in this case.

 

2. I am the pretty sure the for all entries is not required here . Company codes are normally not many for any system. Rather we can populate a range table for BUKRS using the entries in g_comp_code and use that in WHERE clause. And offcourse remove duplicates.

 

3. Remove "BETWEEN" and create a range table using OPTION = 'BT' for timestamp and use that in where clause.

 

R


Viewing all articles
Browse latest Browse all 3316

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>