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

  • Home
  • SEARCH
  • 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 6742615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:51:53+00:00 2026-05-26T11:51:53+00:00

I was thinking of starting to utilize views to reduce the complexity of code

  • 0

I was thinking of starting to utilize views to reduce the complexity of code and queries in our project — some of them have a few joins, and from what I understand, MySQL views would allow us to reference that data a little easier in multiple places.

There’s a lot of stuff being thrown around, where “MySQL doesn’t use indexes for views”, “You can’t have an indexed view”, “Only if you use MERGE”… There is no clear-cut answer.

So, to cut to the chase: Do MySQL views use indexes on the tables they are built from? Is it a bad idea to use views at all because performance will be abysmal, or will it use the indexes on the underlying tables when doing its joins? If I sort a view by a column that is indexed in the table, does it still sort as fast as it normally would?

Doing my research seems to indicate that views don’t use indexes, but if that was the case nobody would ever use them; obviously people do, so…?

Sorry if this seems kind of absurd.

  • 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-05-26T11:51:53+00:00Added an answer on May 26, 2026 at 11:51 am

    If you query a view, MySQL will consider using indexes on the underlying tables.

    However it is not possible to add a new index to a calculated column in the view. I think this is what people meant by MySQL not having indexed views, as opposed to (for example) SQL Server’s indexed views.

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

Sidebar

Related Questions

I'm thinking about starting a new project using EF 4 and going through some
I'm thinking about starting work on a fairly large scale .NET or ASP.NET project
I have been thinking of starting a site of my own for long time.
I've been thinking about starting a new project in C#.NET (4.0RC) for a couple
I'm thinking about starting to develop a plugin for AutoCAD, but I have absolutely
I'm thinking about starting a crazy enough hobby project that would span across several
I'm thinking about using ASP.NET in a new project I'm starting and I'm wondering
Maybe I am not thinking about this correctly. I am starting my second project
I'm starting to write a small web application and have started thinking about securing
I am thinking in starting a personal pet web project to experiment with different

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.