optimizer-hints

Is direct-path insert a good way to do bulk inserts in Oracle?

We're trying to figure out the best way to handle BULK INSERTs using Oracle (10gR2), and I'm finding that it can be a pretty complicated subject. One method that I've found involves using the Append optimizer hint: INSERT /*+ Append*/ INTO some_table (a, b) VALUES (1, 2) My understanding is that this will tell Oracle to ignore indexe...

Does GCC inline C++ functions without the 'inline' keyword?

Does GCC, when compiling C++ code, ever try to optimize for speed by choosing to inline functions that are not marked with the inline keyword? ...

What can happen as a result of using (nolock) on every SELECT in SQL Sever?

I get that the (nolock) optimizer hint allows for "dirty reads", but under what very specific scenarios is this a bad idea? I've never seen such widespread use of (nolock) in an organization, and it makes me nervous. I'd like an explanation in terms of user stories. "Paul does A, Peter does B, X happens instead of Y". ...

How can I choose different hints for different joins for a single table in a query hint?

Suppose I have the following query: select * from A, B, C, D where A.x = B.x and B.y = C.y and A.z = D.z I have indexes on A.x and B.x and B.y and C.y and D.z There is no index on A.z. How can I give a hint to this query to use an INDEX hint on A.x but a USE_HASH hint on A.z? It seems like hints only take the table name, not the sp...

Should i use MAXDOP to improve my maintenance stored procedure?

Okay so i understand the basics of MAXDOP, but i want to understand if this a valid scenario for using it. I have a stored procedure which is quite resource hungry, but has been optimized to the max. It currently takes 30 minutes (local) to refresh an entire system (what is refreshes isnt really important). This procedure will get exec...

Optimize two simple nested loops

I have been trying to optimize the two following nested loops: def startbars(query_name, commodity_name): global h_list nc, s, h_list = [], {}, {} query = """ SELECT wbcode, Year, """+query_name+""" FROM innovotable WHERE commodity='"""+commodity_name+"""' and """+query_name+""" != 'NU...