I've got a performance issue when using a calculated value in my select statement. I'm inexperienced with Crystal, but experienced with both SQL and other reporting tools.
The database table I'm reporting against has a time field which is the number of seconds since a point in time. The intention of the report is to select all values up to 28 days ago to the present. The conversion of the current date to the appropriate starting point works well, but doesn't get passed to the database, rather a table scan is performed, with the select then compared to every record in the database. Hard coding the intergers that represent the starting point results in a relatively fast query (obviously using the database index). How can I structure the query in Crystal to pass the calculated value to the database and thereby using the indexes?
BTW, the identical query works in MS Access as I would desire, so it's not an ODBC/database issue.
Thanks,
Earl
The database table I'm reporting against has a time field which is the number of seconds since a point in time. The intention of the report is to select all values up to 28 days ago to the present. The conversion of the current date to the appropriate starting point works well, but doesn't get passed to the database, rather a table scan is performed, with the select then compared to every record in the database. Hard coding the intergers that represent the starting point results in a relatively fast query (obviously using the database index). How can I structure the query in Crystal to pass the calculated value to the database and thereby using the indexes?
BTW, the identical query works in MS Access as I would desire, so it's not an ODBC/database issue.
Thanks,
Earl