Hello again.
CR10
Oracle 8i
I have a report, which runs off a VIEW. I have tuned the view, such that I am being returned around 54,000 records in around 8 seconds, off a large number of tables.
The report that this feeds has 4 levels of grouping in it. As such, there are effectively 4 levels of sorting that needs to be done on the data.
At this point, I have a number of options:
1) Let CR ask Oracle to do the sorting, which works, except, takes 46 MINUTES to sort the first level. This is via an ORDER BY in the generated SQL.
2) Let CR itself do the sorting as it reads the records in.
If I take option (1), then, once the records are sorted, they are read in VERY quickly, maybe 1000+/second. This is presumably because CR trusts the order in which the records are arriving.
On the other hand, using option (2), the records come in VERY slowly, 50/second. I also presume this is because CR doesn't have the best sorting routine, which is understandable.
There is a third option, seeing as how I only have 2 values in the first group. When I extract the records, I can select the first value seperately & UNION ALL that with the records of the second value. This then provides me with my sorted list, in just 8 seconds again.
The issue here though is that CR does NOT believe they are sorted, even when I tell the Group to use 'Original Order', so, it reads the records in VERY slowly again.
Does any one know a way to make CR read the records in quickly AND NOT have it try to sort the records?
I previously experienced similar performance issues with an Oracle Stored Procedure, which I put down to the way CR had to tease the records out, 1 at a time, via a CURSOR. I now find myself doubting this previous assumption.
At this point, ANY idea will be attempted, seeing as how I am running out of ideas to follow myself.
Thanks,
Peter.
CR10
Oracle 8i
I have a report, which runs off a VIEW. I have tuned the view, such that I am being returned around 54,000 records in around 8 seconds, off a large number of tables.
The report that this feeds has 4 levels of grouping in it. As such, there are effectively 4 levels of sorting that needs to be done on the data.
At this point, I have a number of options:
1) Let CR ask Oracle to do the sorting, which works, except, takes 46 MINUTES to sort the first level. This is via an ORDER BY in the generated SQL.
2) Let CR itself do the sorting as it reads the records in.
If I take option (1), then, once the records are sorted, they are read in VERY quickly, maybe 1000+/second. This is presumably because CR trusts the order in which the records are arriving.
On the other hand, using option (2), the records come in VERY slowly, 50/second. I also presume this is because CR doesn't have the best sorting routine, which is understandable.
There is a third option, seeing as how I only have 2 values in the first group. When I extract the records, I can select the first value seperately & UNION ALL that with the records of the second value. This then provides me with my sorted list, in just 8 seconds again.
The issue here though is that CR does NOT believe they are sorted, even when I tell the Group to use 'Original Order', so, it reads the records in VERY slowly again.
Does any one know a way to make CR read the records in quickly AND NOT have it try to sort the records?
I previously experienced similar performance issues with an Oracle Stored Procedure, which I put down to the way CR had to tease the records out, 1 at a time, via a CURSOR. I now find myself doubting this previous assumption.
At this point, ANY idea will be attempted, seeing as how I am running out of ideas to follow myself.
Thanks,
Peter.