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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:51:29+00:00 2026-05-29T15:51:29+00:00

I have only one table in my mySql database for a very basic website

  • 0

I have only one table in my mySql database for a very basic website and am using php/mysql calls to add user records to the single table I have called ‘RegisteredUsers’ — each record is:

  (name, member number, name of their subfolder on the server).

A new requirement for me — each of my users can enter from zero to 5000 items and for each item they type a text description.

Each of the user’s ‘items’ is the (name, description) of a piece of ‘early man’ antiquity — a clay pot from prehistoric times, an artifact buried with one of the pharoahs, etc. — and the (name, description) tuples will be limited-size text, ie. (name: text, length=50; description: text, length=512) — the site forces the user to be very succinct in the name and description.

Now that I have to allow each user to add an arbitrary number (from 0 to 5000) of their antiques, although I am a database newbie, I am inclined to create a 2nd table and use the “member number” from the 1st table to index the 2nd table.

Each record of this 2nd table will have the following fields:

  (member number, name-of-the-antique, description).

I’m concerned that if a user wants to delete an item with the name “Babylonia clay pot” from this 2nd table, with up to 5000 antiques for the user — performance will take a hit as I search the 2nd database for

     member number=NN    and   name=One-Of-5000-Antiques.

Is this the correct approach?

  • 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-29T15:51:30+00:00Added an answer on May 29, 2026 at 3:51 pm

    The answer to performance concerns like this is pretty much always an index. Usually you would add one more column to your antiques table, which is a numeric, auto-incrementing primary key. So instead of deleting the item “Babylonia clay pot”, you delete the item with the id 42. This primary key will be indexed and access to any row by id will be virtually instantaneous, no matter how large your table grows (within limits, obviously, but you’ll probably never come close to those limits). You could also create an index on the name-of-the-antique column, but that’ll be less efficient (still way faster than no index though).

    Read about indexes here: http://dev.mysql.com/doc/refman/5.1/en/create-index.html

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

Sidebar

Related Questions

I have created a mysql dump for only one table in my database. The
I have a MySQL table that will only have one row. What should my
I have a mySQL database that tracks our projects and drives our website's display
I have about 28 million records to import into a mySql database. The record
I have a table in MySQL database. In that table there is a text
I'm using mysql/php/apache . I have the following situation: 2 tables where I need
In my MySQL installation I have one InnoDB database that I know will grow
I have a MySQL Database of about 1.7GB. I usually back it up using
We have a web-based application, backed by a MySQL database. One part of the
Currently, I have a log file of messages in one table in a MySQL

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.