Project

General

Profile

Actions

Feature proposal #7295

closed

Review implementing object database column

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

Status:
Rejected
Priority:
High
Assignee:
Target version:
-
Start date:
08 October 2018
Due date:
% Done:

100%

Estimated time:

Description

This should store the ID of the source object. Examples as follows.

Asset: profile.57.registration
Object: 57

Asset: blog.79
Object: 79

Asset: groupjive.group.10.photo.20
Object: 20 (OR this could be 10 if we don't need the photo ID for any SQL compares)

Asset: groupjive.group.102.join
Object: 102

Asset: activity.132974.comment
Object: 132974

The idea is that it'll allow extending the queries to check for object access more efficiently and rebuilding of the object won't require a full parse of the asset to get the ID. This should be an int(11) column for efficient int comparison and lookup. Implement for Activity, Comments, and Notifications tables.

For a real world example we could check that the asset is a GJ photo relatively easily with a LIKE usage (not prefixed with %) which will work with index. Now that we know it's a photo we can grab compare the object to the GJ photo row and get the group id and check for access from there. If we don't need to do that we could just store the group id as Object and work from there. This removes the odd SUBSTRING_INDEX compares and allows int = int compares for significantly improved performance.

Actions

Also available in: Atom PDF