Missing index for `SELECT * FROM
*PREFIX*polls_polls WHERE (
deleted = 0) OR (
owner = "admin")
`
#3361
Open
3 of 12 tasks
Labels
What went wrong, what did you observe?
I'm analyzing a production installation of this app and noticed that the query
SELECT * FROM
PREFIXpolls_pollsWHERE (
deleted= 0) OR (
owner= "admin")
does not use an index.What did you expect, how polls should behave instead?
Depending on the data the use of an index might be beneficial or not. E.g. if you only have polls of one user, then a full table scan be will more efficient anyway.
An possible index could be
create index polls_polls_owner_deleted_idx on oc_polls_polls (owner, deleted);
.What steps does it need to replay this bug?
Installation method
Installed/updated from the appstore (Apps section of your site)
Installation type
First time installation
Affected polls version
5.4.3
Which browser did you use, when experiencing the bug?
Other browser
No response
Add your browser log here
No response
Additional client environment information
No response
NC version
Nextcloud 26
Other Nextcloud version
No response
PHP engine version
PHP 8.0
Other PHP version
No response
Database engine
MySQL
Database Engine version or other Database
No response
Which user-backends are you using?
Add your nextcloud server log here
No response
Additional environment informations
No response
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: