Fork me on GitHub
Subscribe 3

Ticket #738 (fixed bug)

N+1 queries in admin_users.php

  • Created: 2012-09-04 15:03:02
  • Reported by: Franz
  • Assigned to: quy
  • Milestone: 1.5.1
  • Component: performance
  • Priority: normal

There's a rather ugly query inside a loop in admin_users.php that could be optimized.

Forum topic: https://fluxbb.org/forums/viewtopic.php?id=6588

History

Newman 2012-09-05 03:03:40

Thanks for the add

quy 2012-09-29 02:51:53

Retract comment.

Comment edited 1 times (Diff)

Newman 2012-09-29 08:14:18

@quy how is it rewriting the code when you simply change it to a IN Clause which is 100% increased performance?

quy 2012-09-30 02:37:39

Because there isn't information in the Users table for guests and deleted members (both have IDs of 1) in order to use IN. I will look into it further when time permits.

quy 2012-10-02 00:34:46

Commit 5f0e256 to fluxbb master

#738: Optimized code to remove a query inside a loop in admin_users.php

quy 2012-10-02 00:36:49

  • Owner set to quy.
  • Status changed from open to fixed.

Thanks Newman.