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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:57:26+00:00 2026-05-11T07:57:26+00:00

After following this recommendation regarding tags tables structure, I’ve implemented the following design: Table:

  • 0

After following this recommendation regarding tags tables structure, I’ve implemented the following design:

Table: Item Columns: ItemID, Title, Content  Table: Tag Columns: TagID, Title  Table: ItemTag Columns: ItemID, TagID 

I’m facing another problem, I wanna display the number each tag appears in the system. What’s the best way to do this in terms of search query / php code that will not cause a severe performance impact (tags count will appear for each item).

Thanks,

Roy

  • 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. 2026-05-11T07:57:26+00:00Added an answer on May 11, 2026 at 7:57 am
    select count(*) from ItemTag where TagId = X 

    is mySQL that will get it dynamically.

    If you’re worried about the performance hit, you should store a count in the tag table, and increment/decrement it when you tag or untag an item.

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

Sidebar

Related Questions

After following this MVC 4 tutorial series I was trying some of the stuff
After following the steps outline in this Fluent NHibernate tutorial I am stuck on
After hours I am giving up on debugging the following: This works: URL[] urls
After resolving issues with RIA installation here , I'm still getting this following error.
I am trying to make a JQGrid for a simple table. After following through
After following this question , I added HttpServletRequest parameter to my method. But I
After competing in and following this year's Google Code Jam competition, I couldn't help
I'm using jquery_token_input after following Ryan Bates railscast #258 and this is the code
my setup is ubuntu - gitolite - msysgit. After following this tutorial : https://sites.google.com/site/senawario/home/gitolite-tutorial
After following the advice in this question successfully, I added a couple additional lines

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.