Open Bug 1710717 Opened 3 years ago Updated 2 years ago

check if JobPagination should switch away from CustomPagination

Categories

(Tree Management :: Treeherder, task)

Tracking

(Not tracked)

People

(Reporter: aryx, Unassigned)

Details

While investigating load spikes from treeherder.webapp.api.jobs:JobsViewSet.list with

SELECT `job`.`submit_time`, `job`.`start_time`, `job`.`end_time`, `job`.`failure_classification_id`, `job`.`id`, `job_group`.`name`, `job_group`.`symbol`, `job_type`.`name`, `job_type`.`symbol`, `job`.`last_modified`, `job`.`option_collection_hash`, `machine_platform`.`platform`, `job`.`option_collection_hash`, `job`.`push_id`, `push`.`revision`, `job`.`result`, `reference_data_signatures`.`signature`, `job`.`state`, `job`.`tier`, `taskcluster_metadata`.`task_id`, `taskcluster_metadata`.`retry_id` FROM `job` INNER JOIN `job_group` ON (`job`.`job_group_id` = `job_group`.`id`) INNER JOIN `job_type` ON (`job`.`job_type_id` = `job_type`.`id`) INNER JOIN `machine_platform` ON (`job`.`machine_platform_id` = `machine_platform`.`id`) INNER JOIN `push` ON (`job`.`push_id` = `push`.`id`) INNER JOIN `reference_data_signatures` ON (`job`.`signature_id` = `reference_data_signatures`.`id`) LEFT OUTER JOIN `taskcluster_metadata` ON (`job`.`id` = `taskcluster_metadata`.`job_id`) WHERE `job`.`push_id` = %s ORDER BY `job`.`id` ASC

it has been noticed JobPagination is utilizing the CustomPagination and this should be scrutinized.

As I recall CustomPagination is more performant, because it's not performing a full table scan (it's override default behavior). I suspect any slow queries would be from the multiple joins needed to return all of this data that is then paginated.

You need to log in before you can comment on or make changes to this bug.