Guest_imported
New member
- Jan 1, 1970
- 0
The reports i am working on uses five or six tables. The size of all these tables i mean the number of records is very big. Tell me which method is very
efficient and faster.
1. Directly select all tables from crystal reports and code the selection formula in Report --> Edit selection formula --> Record to filter records.
2. Make view which has all the tables involved and add the where conditions so that the records are filtered at server side.
For eg create view like this
select col1, col2, col3, col4........
where table1.prikey = table2.forkey and
table1.key1 = table3.key2 (+)......
Now use this view in stored procedure and depending on the user input, records can be filtered by using the stored procedures parameters. The records returned by stored procedure can be used by crystal reports.
I think the second method will be faster as records are filtered at server. In first method all the records are loaded......then the records are filtered by crystal reports. The difference is in first method records are filtered at crystal reports and in second method records are filtered at server. Help me if i am wrong.
Thanks
Satya.
efficient and faster.
1. Directly select all tables from crystal reports and code the selection formula in Report --> Edit selection formula --> Record to filter records.
2. Make view which has all the tables involved and add the where conditions so that the records are filtered at server side.
For eg create view like this
select col1, col2, col3, col4........
where table1.prikey = table2.forkey and
table1.key1 = table3.key2 (+)......
Now use this view in stored procedure and depending on the user input, records can be filtered by using the stored procedures parameters. The records returned by stored procedure can be used by crystal reports.
I think the second method will be faster as records are filtered at server. In first method all the records are loaded......then the records are filtered by crystal reports. The difference is in first method records are filtered at crystal reports and in second method records are filtered at server. Help me if i am wrong.
Thanks
Satya.