MDL-32462 accesslib: fix context_user::build_paths performance
commitc08ea5202f27ca2dc8d99cbd17b83fc58ba376ee
authorTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 4 Apr 2012 12:57:27 +0000 (4 13:57 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 20 Apr 2012 09:30:26 +0000 (20 10:30 +0100)
tree3cda4c211c4f211af6d3d32feff4095a6e54c7bc
parent93fb7b528b392c5c9013e3b3e14ccf4ba7d441d7
MDL-32462 accesslib: fix context_user::build_paths performance

The problem was that the query was updating every row whether it needed
it or not. This turns out to be a really bad thing to do on Postgres,
because it then triggers a long expensive vacuum, which lock the context
table for a long time a really bad thing to do.
lib/accesslib.php