Question:
I’m developing a VB client application (using VB5) with an Informix database in the backend. However, the report generation that Crystal Report incorporates has always been very slow. What should I do?
Answer:
See how the reports run when you execute the SQL from the dbaccess command line. If they’re fast and Crystal is slow, you know the problem is with Crystal. If not, it’s a query problem.
Check whether the SQL that’s being executed is using the indexes properly. If you are able to extract the SQL from Crystal and run it in dbaccess, also run it with SET EXPLAIN on. Then, examine the query plan and see how the SQL is being executed.
If you have a DBA, ask him/her to help with this. My bet’s on problems with SQL. Often, a report writer does not generate the most efficient SQL.