Potentially redundant index talk_sessions.ts_attendee_id
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.2k
- Forks
- 587
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 333
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Install the app
Expected behaviour
Efficient database index usage
Actual behaviour
# ########################################################################
# talk_sessions
# ########################################################################
# ts_attendee_id is a left-prefix of ts_attendee_in_call
# Key definitions:
# KEY `ts_attendee_id` (`attendee_id`),
# KEY `ts_attendee_in_call` (`attendee_id`,`in_call`)
# Column types:
# `attendee_id` bigint(20) unsigned not null
# `in_call` int(11) not null default 0
# To remove this duplicate index, execute:
ALTER TABLE `talk_sessions` DROP INDEX `ts_attendee_id`;
Talk app
Talk app version: (see apps administration page: /index.php/settings/apps)
Custom Signaling server configured: yes/no and version (see Talk administration settings: /index.php/settings/admin/talk#signaling_server)
Custom TURN server configured: yes/no (see Talk administration settings: /index.php/settings/admin/talk#turn_server)
Custom STUN server configured: yes/no (see Talk administration settings: /index.php/settings/admin/talk#stun_server)
Browser
Microphone available: yes/no
Camera available: yes/no
Operating system: Windows/Ubuntu/Mac/...
Browser name: Firefox/Chrome/Safari/...
Browser version: 124/125/...
Browser log
Server configuration
Operating system: Ubuntu/RedHat/...
Web server: Apache/Nginx
Database: MySQL/Maria/SQLite/PostgreSQL
PHP version: 8.1/8.2/8.3
Nextcloud Version: (see administration page)
List of activated apps:
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your server installation folder
Nextcloud configuration:
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
Server log (data/nextcloud.log)
Insert your server log here
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the talk_sessions schema and compare the ts_attendee_id and ts_attendee_in_call key definitions shown in the issue. Confirm whether the left-prefix index is redundant without affecting Talk queries, then verify that removing ts_attendee_id leaves efficient database index usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100