|
|
|
|
|
|
Re: Tune query for Sum function [message #647597 is a reply to message #647596] |
Wed, 03 February 2016 11:24 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
I've been looking at a project for positioning a another company's hardware against Exadata. With release 12.x, some Exadata-like capabilities are becoming available on non-engineered systems. The in-memory option is a critical part of this.
|
|
|
Re: Tune query for Sum function [message #647598 is a reply to message #647597] |
Wed, 03 February 2016 19:48 |
|
Kevin Meade
Messages: 2103 Registered: December 1999 Location: Connecticut USA
|
Senior Member |
|
|
We all have to assume your "sample test case" is a realistic representation of your problem (one column being summed, no predicates in the query). Oh well.
Let us recap so far:
1. create an index on the column so that you have a very small "duplicate" object to be scanned instead of the actual full table.
2. put it on EXADATA and let SMARTSCAN do its magic of eliminating physical IO, doing parallel physical IO, and reducing network traffic.
3. pre-load it in memory and skip all the physical IO.
4. use compression to reduce the size of the table and hope the savings in IO outweighs the increased CPU needed for decompression (usually works).
------ and I add --------
5. use partitioning and parallel query to divide the task up into many pieces that multiple processes can do at the same time.
6. use a materialized view or other pre-aggregation strategies to pre-sum results for strategically reusable subsets of the rows.
7. redesign your solution so that you don't need a 10 billion row table or (I guess here) only one wide table with 100s of unrelated metrics on a single row.
8. explore your problem space to see if the SUM is really your problem or if it is something else (chained rows, joins to other tables, bug needing a patch (who knows?)).
Hmm... not a bad summary I think. You can always combine many of these options as well though in most cases, one of them will turn out to be the big winner.
[Updated on: Wed, 03 February 2016 19:51] Report message to a moderator
|
|
|