Thursday, March 22, 2012

Crystal Reports problem

I have a problem when I try to work with alias.
It takes the report 15min to load.
I'm working with 16 aliases and I think thet might be the problem.
Has anybody got any ideas?Do you mean you've got 16 tables joined together in the report?
Does the SQL itself run any faster outside of Crystal?
I had a report that had a driver table joined to another table 3 times. It performed well with 2 tables, just about OK with 3 and terribly with 4. Turned out that the query plan on the database server was rubbish even though all the filter conditions were using indexed columns. Changing the SQL to prevent the indexes being used caused the query to run quickly again!|||Do you mean you have 16 tables joined in the report?
Does the Crystal generated query run as slowly outside of Crystal, or is Crystal itself doing lots of post-processing on the returned data?|||Thet is correct I have 1 table but it has 16 diferent names, because in the table that this one is connected to, has 16 diferent names (but each name gets its value from the same table). So I tryed doing it with only 10 aliases and it works fine (the report loads in 9s).

So what I'm trying to figure out is, does the crystal have a constrain to how many aliases you can use?|||No constraint that I'm aware of - it's just another table after all. My example was similar but I only aliased the same table 3 times with each alias joined to one other table.
Check the query plan - it may be doing a whole load of nested loops that get worse with each new alias you add.|||Thax

I changed my query, and you were wright, I had some sub querys, I changed it a bit and now it works prity fine.

No comments:

Post a Comment