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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:08:18+00:00 2026-06-13T09:08:18+00:00

I’ve got two tables… Table tags +———+———-+ | tag | id | +———+———-+ |

  • 0

I’ve got two tables…

Table “tags”

+---------+----------+
|  tag    |   id     |
+---------+----------+
|  nancy  |   902    |
+---------+----------+
|  fred   |   903    |
+---------+----------+
|  suzan  |   904    |
+---------+----------+
|  joe    |   905    |
+---------+----------+

and table tag to tag

+---------+----------+
|  tag_a  |   tag_b  |
+---------+----------+
|  903    |   902    |
+---------+----------+
|  905    |   903    |
+---------+----------+
|  902    |   904    |
+---------+----------+
|  904    |   905    |
+---------+----------+

I often scan the tag to tag relationships using an INNER JOIN statement with the “tag” table so that I can query who is related to “nancy”. I’m wondering how much better off I would have been better off just dumping the name of the tag into the tag to tag table rather than joining the tag table so that I can look for relationships based on the tag name. Is JOINING the table a huge performance hit? My tag to tag table is in the 900k row range. The tag table is around 30k.

  • 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-13T09:08:19+00:00Added an answer on June 13, 2026 at 9:08 am

    If you wish to store any meta-information about the tag, then you’ll need a tag table anyway. Adding a join does potentially increase the expense of the query a good deal.

    In your case, I recommend you consider the following:

    1. Use InnoDB
    2. Change id to TagString
    3. Place the actual tag in TagString
    4. Create a foreign key to the Tag table, with cascading update/delete

    In this way, you can group, filter, etc… on a single column, but if you need more info, you can join over to the Tag table (or whatever tables you need).

    I ran into some serious performance problems with MySQL when we hit 80,000,000 tag records and were doing live joins to generate tag clouds on http://tagcloud.com … Some caching really helped that, but still, it seemed like it was pushing the design limits of a relational database (in the normal form). We would have been better off to use a different storage format that may be more expensive to write to, but faster to read from.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I've tracked down a weird MySQL problem to the two different ways I was
i got an object with contents of html markup in it, for example: string
string formIdList = 8256, 8258, 8362, 8120, 8270, 8271, 8272, 8273, 8257, 8279, 8212,

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.