Sample Header Ad - 728x90

Select query on information_schema is too slow

0 votes
4 answers
3633 views
SELECT * 
FROM information_schema.TABLE_CONSTRAINTS 
WHERE CONSTRAINT_SCHEMA = DATABASE() 
  AND CONSTRAINT_NAME   = 'FK_FOLDER_FILTER_CONTRACT_CATEGORY_CONTRACT_CATEGORY' 
  AND CONSTRAINT_TYPE   = 'FOREIGN KEY';
The above query takes around 2 mins to execute is there any other alternate query or how can we optimize this query
Asked by Rupesh Bhairat (1 rep)
Feb 26, 2020, 06:24 AM
Last activity: Feb 17, 2023, 01:06 AM