You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good to add an index for both violateddirective and blockeddomain columns to speed up the query
Tested locally, Postgres was fine and was able to add index to those fields. However, when trying to add an index to those fields in MySQL came across this error Specified key was too long; max key length is 3072 bytes.
After a chat with Brendan, a thought was converting the column to text to add an index.
I need to re-import the data again locally from prod and will test converting the columns to text and adding an index. Will create a PR with that shortly.
The text was updated successfully, but these errors were encountered:
Or the other option is adding a derived column which has a hash or similar in it, and it is indexed and we adjust the sql so we are leveraging the derived column instead. Which is almost like a poor mans index in the table.
That was caused by a previous bug in the plugin (I believe it was this one: #59) The data has since been removed on the client site and rebuilding it currently, but with those many rows the report stopped execution.
Whilst running the report, I found with around 4 million records in the local_csp table, the report would fall over at times.
Drilling down further into the error and sql query - found this one was causing some grief
https://github.com/catalyst/moodle-local_csp/blob/master/classes/table/csp_report.php#L178-L179
It would be good to add an index for both
violateddirective
andblockeddomain
columns to speed up the queryTested locally, Postgres was fine and was able to add index to those fields. However, when trying to add an index to those fields in MySQL came across this error
Specified key was too long; max key length is 3072 bytes
.After a chat with Brendan, a thought was converting the column to text to add an index.
I need to re-import the data again locally from prod and will test converting the columns to text and adding an index. Will create a PR with that shortly.
The text was updated successfully, but these errors were encountered: