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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:23:36+00:00 2026-06-04T15:23:36+00:00

Scenario 1 I have one table lets say member. In that table member i

  • 0

Scenario 1

I have one table lets say “member”. In that table “member” i have 7 fields ( memid,login_name,password,age,city,phone,country ). In my table i have 10K records.i need to fetch one record . so i’m using the query like this

mysql_query("select * from member where memid=999");

Scenario 2

I have the same table called “member” but i’m splitting the table like this member and member_txt .So in my member_txt table i have memid,age,phone,city,country )and in my member table i have memid,login_name,password .

Which is the best scenario to fetch the data quickly? Either going to single table or split the table into two with reference?

Note: I need to fetch the particular data in PHP and MYSQL. Please let me know which is best method to follow.
we have 10K records

  • 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-04T15:23:37+00:00Added an answer on June 4, 2026 at 3:23 pm

    For your own health, use the single table approach.

    As long as you are using a primary key for memid, things are going to be lightning fast. This is because PRIMARY KEY automatically assigns an index, which basically tells the exact location for the data and eliminates the need to go through data that it would otherwise do.

    From http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html

    Indexes are used to find rows with specific column values quickly.
    Without an index, MySQL must begin with the first row and then read
    through the entire table to find the relevant rows. The larger the
    table, the more this costs. If the table has an index for the columns
    in question, MySQL can quickly determine the position to seek to in
    the middle of the data file without having to look at all the data. If
    a table has 1,000 rows, this is at least 100 times faster than reading
    sequentially. If you need to access most of the rows, it is faster to
    read sequentially, because this minimizes disk seeks.

    Your second approach only makes your system more complex, and provides no benefits.

    Use the scenario 1.

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

Sidebar

Related Questions

I've got a scenario where I have a database with one table that gets
Here is my scenario, I have query that returns a lot of fields. One
I have the following scenario. I have one table in the database A that
Say I have a simple client/server scenario with one method: // client code $client
I have one scenario in which the user can define the column and that
Here is the scenario: You have a Persons table with a one-to-many relationship with
I have following scenario: Lets say we have two different webparts operating on the
Let's say I have a table that represents a super class, students . And
Lets suppose I have a scenario with the following model: An Animal table which
Here's the scenario: I have 2 tables with data, one is the 2009 version

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.