BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Follow BOB on Twitter! 
Follow BOB on Twitter! (Opens a new window)  

General Notice: No events within the next 45 days.

Command Object question...


 
Search this topic... | Search Crystal Reports... | Search Box
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Author Message
PETE314
Forum Member
Forum Member



Joined: 13 Mar 2017

Posts: 9



PostPosted: Thu Apr 12, 2018 8:48 am 
Post subject: Command Object question...

I am hoping this is an easy question...

Consider the following:

-Crystal Report (2016) is pulling data through a single Command Object.
-Use Server to increase speed is checked...Perform Grouping on Server is not checked but there is no grouping done in the query of data.
-In it's simplest form the command object is

SELECT *
FROM {a single view}
WHERE mydate is between to dates

So my question is when and where is the WHERE conditions being performed?

Is it running the view completely and then filtering? (similar to using the select expert and filtering on Crystal side)

Or is it performing the filter as it is running the view???

Is it pulling the entire view to Crystal before filtering? or is it filtering on the SQL Server and only sending the final result set to Crystal??? In other words is filtering done on the Server or Crystal side in this instance???

Thanks for any insight...
Back to top
PETE314
Forum Member
Forum Member



Joined: 13 Mar 2017

Posts: 9



PostPosted: Thu Apr 12, 2018 9:49 am 
Post subject: Re: Command Object question...

Talking with SAP...this is what I am hearing....

The Filtering takes place on the SQL Server. However it does appear the filtering takes place AFTER the view has run.

So in our case the tables we are pulling from in the view are huge. and it is really slowing down our process because it is not filtering as it runs the view. Knowing this we can not only fix this issue but also avoid the issue altogether.
Back to top
hilfy
Forum Enthusiast
Forum Enthusiast



Joined: 16 Apr 2007
ASUG Icon
speaker.gif*3
Posts: 1846
Location: Atlanta, GA


flag
PostPosted: Mon May 14, 2018 9:46 am 
Post subject: Re: Command Object question...

If you have anything in the Select Expert, those filters will be applied after the data has returned from the server. The Where clause in a command will be run on the database server.

For information about how commands work, please see my blog post here: https://blogs.sap.com/2015/04/01/best-practices-when-using-commands-with-crystal-reports/

-Dell

_________________
Protiviti
Data & Analytics Practice
https://www.protiviti.com/US-en/data-management-advanced-analytics
Back to top
anil.ganga1
Principal Member
Principal Member



Joined: 04 Jul 2007
ASUG Icon
Posts: 465
Location: San Francisco


flag
PostPosted: Fri May 18, 2018 11:10 am 
Post subject: Re: Command Object question...

First question: Are you using each and every field that is coming from the view in your report?

Your query may look very simple with "Select * from table/view" but this plays a vital role in your report performance. If your table have 100k records between two selected dates, your report takes time to scan and fetch 100K records, where you would see only 20K records in your report because you wouldn't display all the fields.

Don't bring unnecessary fields into your report. Select the fields that are required in your report.

Ex:
select a,b,c from table/view;

_________________
Thanks,
Anil.

Business Objects 6.5/XIR2/3.X/4.X
Crystal Reports 9/XI/XIR2/XIR2A/2008/2011/2013/2016
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0416 seconds using 17 queries. (SQL 0.0036 Parse 0.0010 Other 0.0370)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo