Project

General

Profile

Actions

Bug #7497

closed

Prefetch query too slow

Added by krileon about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
20 March 2019
Due date:
% Done:

100%

Estimated time:

Description

When doing an asset prefetch to see if rows exist for an asset it's joining the _user and _comprofiler table unnecessarily and also returning duplicate assets due to missing DISTINCT. The result is a rather slow query. Removing both joins and adding DISTINCT reduces the query from 1s against 500k rows to 1ms providing MASSIVE performance gains.

Actions

Also available in: Atom PDF