WordPress.org

Ready to get started?Download WordPress

Forums

In wp_term_taxonomy table, why are term_taxonomy_id and term_id not the same? (1 post)

  1. Michael Torbert
    WordPress Virtuoso
    Posted 6 years ago #

    In wp_term_taxonomy table, why are term_taxonomy_id and term_id not the same?

    The term_id column is the same as the term_id column in the wp_terms table.
    The term_taxonomy_id column is the same as the term_taxonomy_id column in wp_term_relationships.

    Usually they are the same number, but sometimes they're different. What is the purpose of not using the same number for both?

    I rewrote the admin->manage/edit->post code from scratch to use fewer sql queries (I have a blog that has 5500 categories and the WordPress code makes it time out) and not realizing there was a distinction between the two database columns made it stressful and took longer to complete.

    Does anyone know the reason for two different ones, which then requires you to go from one to the other depending on what you're doing?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 6 years ago by Michael Torbert
  • This topic is not resolved
  • WordPress version: 2.3.3