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 6038889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:17:16+00:00 2026-05-23T06:17:16+00:00

the deal is this: I have a MySQL database that is built in this

  • 0

the deal is this:

I have a MySQL database that is built in this manner:
There are three tables, one for “objects”:

ID | Type       | Name        | Description
--------------------------------------------
1  | Restaurant | Joe's Grill | A Great Place

and than a table for metadata about each “object” designed like:

Object ID | Name ID | Description ID
-----------------------------------
1         | 2       | 4

and another table for the strings of the metadata:

ID | String
---------------
1  | Hello
2  | City
3  | London
4  | Paris

so in this case Joe’s Grill restaurant (ID: 1) has a metadata attached to it
(you can see that by the Object ID column of the metadata table)
and the Name ID and Description ID columns correspond to the strings of the metadata strings table.

The problem is that SELECT queries will need multiple JOINs each time,
so I wanted to create a view that will do this automatically,
the thing is I also want indexes for this view because the view will
also get very large.

The question is:

  1. I know it’s not possible to create an index for a view? is there an alternative to this?

  2. if not, what’s the next best option? maybe there’s another way except a view
    to create a table out of a query?
    maybe set up a script that will do this?

  3. if neither of those is possible, is there anything else I can do?

Thank you all in advance, I’ve really been cracking my head over this
for quite some time.

  • 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-23T06:17:17+00:00Added an answer on May 23, 2026 at 6:17 am

    sounds like you want a materialized view.

    1. you can update the mv with triggers
    2. you can update the view in a batch
    3. there is a tool called flexviews
    4. or you can update the materialized view in your code.

    an alternative is to just generate large but well optimized queries. that might be okay depending upon your requirements…

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

Sidebar

Related Questions

Here's the deal. I have a big class hierarchy and I have this one
Here's the deal. Is there a way to have strings tokenized in a line
basically i have this structure: Deal has and belongs to many Channels Deal has
Or perhaps this is a manual install only deal.
I've read a great deal of discussion recently (both on this site and elsewhere)
I have to deal with text files in a motley selection of formats. Here's
I have a great deal of data to keep synchronized over 4 or 5
I have to build a service for different kind of populations. This service contains
I have to deal with two types of inline tags in xml documents. The
I have a css rule like this: .foo:active { background-position: 0px -382px; } .foo

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.