Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8126069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:01:56+00:00 2026-06-06T07:01:56+00:00

I am working with a fairly old web app that uses MySQL as the

  • 0

I am working with a fairly old web app that uses MySQL as the database. 90% of the tables are MyISAM, they have no indexes on their foreign keys for the most part.

I was considering porting the whole thing over to InnoDB so I can apply foreign key constraints and the like. However as the application is old and a bit gangly it’s been relying on code to enforce referential integrity and I fear that making this change in the database could result in multiple code failures. I don’t have time to go through the whole code base and ensure that everything does what it is supposed to, I have no reason to suspect that it doesn’t I’m just aware of the possibility of adding foreign key constraints causing unforeseen issues.

I was thinking another approach could be to simply add indexes on the foreign key fields without creating constraints. I’m thinking this would improve performance without the risk of damaging existing functionality. Could anyone tell me if there is a reason not to do this? Would I receive the same performance boost doing this as I would adding indexes AND foreign key constraints?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:01:59+00:00Added an answer on June 6, 2026 at 7:01 am

    Yes, just adding the indices should give you almost the same performance boost. The foreign key constraints are more for referential integrity than performance.

    There may be some cases where adding those constraints help the DB engine construct a more efficient execution plan; but that’s a minor consideration, compared with the benefit of adding well-targeted indices to an index-less database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a web app that will replace old systems in
I'm working on a fairly large web site built in PHP that will potentially
I am working on a fairly complicated project. We have a c# forms app
I'm currently working with a fairly old product that's been saddled with a lot
I have a vertical drop-down menu that is working fairly well. I have one
I have a menu working fairly well but can't figure out how to make
I'm working on a fairly large site and am having trouble managing z-indexes. Is
I'm working on a Cocoa app that monitors what you're listening to in iTunes,
I have an ASP.NET Web Application project that I am using to host a
I am working on a fairly large project and have recently bumped into the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.