[MDEV-28979] Feature Request: Allow for indexes to be created on the information_schema tables Created: 2022-06-29  Updated: 2022-10-28  Resolved: 2022-07-06

Status: Closed
Project: MariaDB Server
Component/s: Information Schema
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Kyle Hutchinson Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-11655 Transactional data dictionary Open
relates to MDEV-17581 Data dictionary Open
relates to MDEV-20609 Full table scan in INFORMATION_SCHEMA... Closed

 Description   

Hello,
I have a customer who has run into an issue when they have data they want to query in information_schema tables but the tables have 100,000's+ records in them. The more records that get added the worse their query performs.
Could it be possible to set up a way to allow indexes be created against tables in the information_schema? Whether it be allowing

alter table add index...

or some way to specify it in the MariaDB config file.
These indexes should not be created by default, and only by users who feel they need them.



 Comments   
Comment by Daniel Black [ 2022-06-29 ]

Because of the way the information_schema is written, its currently easier to write in specific optimizations like those that exists for information_schema.tables when in a specific database/table.

If you provide a more specific information_schema table request and what sort of look ups are being performed maybe an optimization can be achieved in a shorter development time.

Assuming this request is table related, the alternative is for the data dictionary aspects to be implemented and for this to become a real table, which would have greater support for arbitrary indexes.

Comment by Kyle Hutchinson [ 2022-07-01 ]

The customer is using two Java functions to verify that the data being sent to the procedures is a valid data type. getProcedures & getProcedureColumns are the methods they are using.

Comment by Diego Dupin [ 2022-07-04 ]

this is exactly MDEV-20609

Comment by Sergei Golubchik [ 2022-07-06 ]

information_schema "tables" are not tables as such, but views into system data. Views cannot have user-defined indexes.

Generated at Thu Feb 08 10:04:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.