Project

General

Profile

Actions

Bug #7294

closed

Hidden SQL inefficient

Added by krileon about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
05 October 2018
Due date:
% Done:

100%

Estimated time:

Description

A 100,000 activity entry database slows to a crawl when trying to exclude hidden activity entries on large datasets (e.g. count queries or hidden activity page). Exclusion and exclusion of hidden activity SQL needs significantly improved.

Actions #1

Updated by krileon about 6 years ago

Removing hidden SQL results in a 25ms (will increase with more activity and hidden rows) being 10ms. Hidden activity page is inaccessible due to incredibly long query time.

Actions #2

Updated by krileon about 6 years ago

It's due to using a single column to store either asset, item id, or user id.. split this into 3 more optimized columns then just do simple IN/NOT IN subqueries.

Actions #3

Updated by krileon about 6 years ago

  • % Done changed from 0 to 40
Actions #4

Updated by krileon about 6 years ago

Part of the issue is the test data being used was for thousands of hidden rows that didn't ever exist. So this was throwing off performance checks. Cleaned up test data to represent real scenarios. JOINs appear to be ok with real test data.

Actions #5

Updated by krileon about 6 years ago

  • % Done changed from 40 to 60
Actions #6

Updated by krileon about 6 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 60 to 100
Actions #7

Updated by krileon about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF