Hello.
Oracle 8i
I have a query which I have just tuned, returning 54K rows in around 4 seconds.
This query is being pumped into a Crystal Report, which, optimally, wants to issue an ORDER BY clause.
If I let it do the sort on Oracle, the sort itself, on just a single, field takes some 46 MINUTES.
A few questions I guess:
1) To get good sort times, should the field being sorted upon be indexed? What if I sorted on multiple fields, a single index covering multiple fields, or multiple indexes?
2) What if the field I am sorting on is the result of a DECODE function call? How can I get good performance from this?
3) Should I be looking at the DB setup for any specific issue(s)?
I am aware I have a fairly open ended set of questions, but, I'm running out of options when tackling the problem from the Crystal Reports side of the fence.
I am NOT a DBA, but a developer, as such, any suggestions may need a little more explanation for me.
Thanks,
Peter.
Oracle 8i
I have a query which I have just tuned, returning 54K rows in around 4 seconds.
This query is being pumped into a Crystal Report, which, optimally, wants to issue an ORDER BY clause.
If I let it do the sort on Oracle, the sort itself, on just a single, field takes some 46 MINUTES.
A few questions I guess:
1) To get good sort times, should the field being sorted upon be indexed? What if I sorted on multiple fields, a single index covering multiple fields, or multiple indexes?
2) What if the field I am sorting on is the result of a DECODE function call? How can I get good performance from this?
3) Should I be looking at the DB setup for any specific issue(s)?
I am aware I have a fairly open ended set of questions, but, I'm running out of options when tackling the problem from the Crystal Reports side of the fence.
I am NOT a DBA, but a developer, as such, any suggestions may need a little more explanation for me.
Thanks,
Peter.