Opened 8 years ago

Closed 8 years ago

#10391 closed Bug Report - General (Duplicate)

Slow MythTV startup if DB has many tables

Reported by: Nigel Owned by: Nigel
Priority: minor Milestone: unknown
Component: MythTV - General Version: 0.24
Severity: low Keywords:
Cc: Ticket locked: no


When MythTV connects to the database, DBUtils::CheckTables?() and IsNewDatabase?() call DBUtils::GetTables?(), which does a query to select all table names. For a few users with excessively large databases, this causes a hang (delay?) at startup:

Checking specifically for a few tables (e.g. settings, recorded) would be a lot faster than enumerating hundreds or thousands of tables?

Change History (3)

comment:1 Changed 8 years ago by stuartm

Resolution: Invalid
Status: newclosed

We are only checking the tables for 'mythconverg' and that database doesn't have hundreds or thousands of tables.

In the linked forum thread the user boils down the relevant query and in the process leaves out the critical WHERE INFORMATION_SCHEMA.TABLES.TABLE_SCHEMA = DATABASE()

The query in question isn't returning a list of the tables outside mythconverg, so it's not the cause of the delay he's experiencing. That said any application requiring thousands of tables is not only very stupid, it's an entirely unsupported have something so obviously resource intensive sharing a database with MythTV.

comment:2 Changed 8 years ago by sphery

Resolution: Invalid
Status: closednew

comment:3 Changed 8 years ago by sphery

Resolution: Duplicate
Status: newclosed

This is a dup of #9742.

The user is using a version of MythTV 0.24-fixes that's a year old. This bug was fixed 10 months ago.

The user is also running mythtv using an "excessively permissioned" mysql user who has access to all those "hundreds or thousands" of tables in the database. See and the rest of the thread for details.

Last edited 8 years ago by stuartm (previous) (diff)
Note: See TracTickets for help on using tickets.