Be sure to review our Idea Submission Guidelines for more information!
Submission Guidelines
If you are connecting to an Oracle database you can get faster results with adding a short hint to your SQL query. For a query like this
SELECT customers.cust_first_name, customers.cust_last_name,
MAX(QUANTITY_SOLD), AVG(QUANTITY_SOLD)
FROM sales, customers
WHERE sales.cust_id=customers.cust_id
GROUP BY customers.cust_first_name, customers.cust_last_name;
add /*+ PARALLEL(4) */ (or depending on your CPU size 😎 and that SQL becomes this;
SELECT /*+ PARALLEL(4) */ customers.cust_first_name, customers.cust_last_name,
MAX(QUANTITY_SOLD), AVG(QUANTITY_SOLD)
FROM sales, customers
WHERE sales.cust_id=customers.cust_id
GROUP BY customers.cust_first_name, customers.cust_last_name;
There is a similar capability for SQL Server too...
SELECT *
FROM Sales.SalesOrderDetail
OPTION (MAXDOP)
I suggest adding this feature in in-db tools so that no one needs to alter the SQL query itself...
You can check out the inner workings for oracle here; https://docs.oracle.com/cd/E11882_01/server.112/e25523/parallel002.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.