nextcloud / nextcloud/spreed

Potentially redundant index talk_sessions.ts_attendee_id

Open
#14,725 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug performance 🚀
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

  1. 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
``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.