)]}'
{"octavia/db/repositories.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"734a3366b532a2716dec28ba89d5c95c96a3ff4d","unresolved":false,"context_lines":[{"line_number":993,"context_line":""},{"line_number":994,"context_line":"        This is a time sensitive query that occurs often."},{"line_number":995,"context_line":"        It is an explicit query as the ORM produces a poorly"},{"line_number":996,"context_line":"        optimized query."},{"line_number":997,"context_line":""},{"line_number":998,"context_line":"        Use extreme caution making any changes to this query"},{"line_number":999,"context_line":"        as it can impact the scalability of the health manager."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_8b7dbec4","line":996,"updated":"2018-12-18 18:31:18.000000000","message":"If you\u0027d like, I can show you how to translate the query below exactly using the ORM, there\u0027s nothing unusual about it. can you point me to the ORM version that produces the poorly optimized query?\n\nAdditionally, it looks like the source of the query\u0027s expense is likely to be all those LEFT OUTER JOINs which appear to be approximating joined eager loading.   An alternative is to emit these as separate queries against an IN list of identifiers, so that no LEFT OUTER JOIN is needed.   SQLAlchemy also has a loader which does this, in 1.2 it still emits an INNER JOIN and the 1.3 version doesnt use JOIN at all.   If this query can be converted back to the ORM I can illustrate these different techniques (e.g. different loader styles) and the one which performs the fastest can be used. For related collection loading the \"selectin\" loader is very fast on MySQL.","commit_id":"ce21022ead967d6658de1fcef6779e9205614f0c"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"734a3366b532a2716dec28ba89d5c95c96a3ff4d","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"            if row[\u0027list_id\u0027] and row[\u0027list_id\u0027] not in listeners:"},{"line_number":1042,"context_line":"                listener \u003d {\u0027operating_status\u0027: row[\u0027list_op_status\u0027]}"},{"line_number":1043,"context_line":"                listeners[row[\u0027list_id\u0027]] \u003d listener"},{"line_number":1044,"context_line":"            if row[\u0027pool_id\u0027]:"},{"line_number":1045,"context_line":"                if row[\u0027pool_id\u0027] in pools and row[\u0027member_id\u0027]:"},{"line_number":1046,"context_line":"                    member \u003d {\u0027operating_status\u0027: row[\u0027mem_op_status\u0027]}"},{"line_number":1047,"context_line":"                    pools[row[\u0027pool_id\u0027]][\u0027members\u0027][row[\u0027member_id\u0027]] \u003d member"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_cb33b610","line":1044,"updated":"2018-12-18 18:31:18.000000000","message":"this could be made more succinct using a collections.defaultdict","commit_id":"ce21022ead967d6658de1fcef6779e9205614f0c"}]}
