Basically, if you are running code similar to above, the reason your job is slow is because you are not optimizing where your work is being performed:
Every time you write
SELECT *you probably are bringing back more data than you actually need — you are hurting your performance.
Every time you don’t have a
WHEREclause, you are hurting your performance.
Every time your process queries the database multiple times (ie. multiple
SELECTstatements in your job to bring back data), you are hurting your performance.
It’s nothing new for data professionals, but for application developers who avoid the database as much as possible due to a lack of knowledge, this might be a good wake-up call.