Welcome Guest, Not a member yet? Register   Sign In
Optimization on Nested Loop
#7

Data intensive operations are easier to optimize inside the database. If possible your looping/subquery should be done in SQL.
The first big hit this avoids is the repetitive database I/O between your PHP code and the database.]
Secondly, you can experiment with EXPLAIN (query) and indexes. (emp_id is probably already indexed, however)
Reply


Messages In This Thread
Optimization on Nested Loop - by codeigniter_guru - 11-10-2017, 01:55 AM
RE: Optimization on Nested Loop - by Narf - 11-10-2017, 04:31 AM
RE: Optimization on Nested Loop - by PaulD - 11-10-2017, 04:36 AM
RE: Optimization on Nested Loop - by Narf - 11-10-2017, 06:19 AM
RE: Optimization on Nested Loop - by averroez - 11-14-2017, 12:23 AM
RE: Optimization on Nested Loop - by Shawn - 12-22-2017, 03:04 PM
RE: Optimization on Nested Loop - by rolly - 12-24-2017, 02:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB