Project

General

Profile

Actions

Feature proposal #7119

closed

Further improve SQL structure

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

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
16 April 2018
Due date:
% Done:

100%

Estimated time:

Description

The database structure of some tables can be improved further to increase performance. Changes suggested as follows.

_comprofiler_plugin_activity_following
Remove the id column and make user_id | asset a unique index. A user can only follow an asset once. id primary key doesn't make any sense here.

_comprofiler_plugin_activity_hidden
Same here. Remove primary key id and add unique index on user_id | type | item as you can't hide the same thing twice.

_comprofiler_plugin_activity_likes
Again, same. Remove primary key id and add unique index on user_id | asset as you can't like the same asset twice.

I would like to do the same for tags, but since tags accepts tagging someone that isn't a user (e.g. tagging a name) it won't be possible to index that unique by user_id | asset | tag. Also if #6969 doesn't happen then give the read table same unique index treatment.

All the above changes need significant testing to ensure they'll actually bring performance gains.

Actions #1

Updated by krileon about 1 year ago

  • Status changed from Assigned to Rejected
  • Target version deleted (6.0.0)
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF