Ask Experts Questions for FREE Help!
 

Free Answers in 3 Easy Steps

Register Now
3 Steps
 


Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.
  View Answers    Answer this question    Ask a question  
 

Idrees
Nov 7, 2008, 04:06 AM
Hi.

I want to make a database which'll have many tables. One of the table is USER. So I want to search username in User table. My question is if there are 3 fields in this table will it take less time to get search result of username as compared to if I've 30 fields in this table. Or you can say if there are less number of fields in a table then will it take less time to search any field from thousands of records. If this is so then is it a good idea to shif some of the fields of User table in anyother table?:confused:

JBeaucaire
Nov 7, 2008, 06:42 AM
If UserName is a specific field, it won't matter how many other fields there are, they're not being searched. The search will operate as quickly as ever if you restrict the search to the single field UserName.

ScottGem
Nov 7, 2008, 06:46 AM


A lot depends on how you do your searches and how your database is designed.

Generally fields that will be searched are indexed. Indexed fields will search faster that non indexed fields, regardless of the number of fields in the table.

But keeping the number of fields down is a principle of relational database design. I suggest you read up on normalization.

Idrees
Nov 10, 2008, 12:09 AM
A lot depends on how you do your searches and how your database is designed.

Generally fields that will be searched are indexed. Indexed fields will search faster that non indexed fields, regardless of the number of fields in the table.

But keeping the number of fields down is a principle of relational database design. I suggest you read up on normalization.

But my question is that if there are 3 tables in a database and I've to search from the 1st table then if either size of the 1st table is big or small, will it change speed of search if the 1st table is small as compared to being big.

ScottGem
Nov 10, 2008, 05:32 AM
We answered that, Thge number of fields doesn't affect searches unless you are trying to do a full text search throughout the table. Otherwise searching is restricited to the field being requested in the search,