Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

Response Time

$
0
0

Hi

  I have below query in SSRS and it takes approx 6-7 min. There are more than 1 crore records. Can we improve the query further to reduce response time

<div style="color: #26282a; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #ffffff;">SELECT A.[G_L Account No_] as 'Account No' ,  A.[Global Dimension 1 Code], (select [Name] from [XYZ$G_L Account]  where [No_] = A.[G_L Account No_]) as Name,</div> <div style="color: #26282a; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #ffffff;">(select sum([Debit Amount])-sum([Credit Amount])   from [XYZ Retail Limited$G_L Entry]  where [Posting Date] < @frdate and [G_L Account No_] = A.[G_L Account No_] and [Global Dimension 1 Code] = A.[Global Dimension 1 Code] ) as OAmt,</div> <div style="color: #26282a; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #ffffff;">(select sum([Debit Amount])-sum([Credit Amount])  from [XYZ$G_L Entry]  where [Posting Date] between @frdate and @todate and [G_L Account No_] = A.[G_L Account No_] and [Global Dimension 1 Code] = A.[Global Dimension 1 Code] ) as TAmt,</div> <div style="color: #26282a; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #ffffff;">(select sum([Debit Amount])-sum([Credit Amount])  from [XYZ$G_L Entry]  where [Posting Date] <= @todate and [G_L Account No_] = A.[G_L Account No_] and [Global Dimension 1 Code] = A.[Global Dimension 1 Code] ) as ClAmt</div> <div style="color: #26282a; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #ffffff;">from [XYZ$G_L Entry] as A</div> <div style="color: #26282a; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #ffffff;">where A.[Posting Date] <= @todate </div> <div style="color: #26282a; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #ffffff;">group by A.[G_L Account No_], A.[Global Dimension 1 Code] </div>

Thanks


Viewing all articles
Browse latest Browse all 1418

Trending Articles



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