#1 (permalink)  
Old 06-30-2011, 09:16 PM
phpmotion's Avatar
Senior Member
 
Join Date: Feb 2008
Posts: 941
Default How to make an index in a DB

There is a recommendation that if you index your DB it can be searched faster but how do you do that effectively?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-07-2011, 12:02 AM
geek's Avatar
Senior Member
 
Join Date: Apr 2008
Posts: 1,274
Default

You can go to phpmyAdmin and do that. Go to the DB you want then the table and row and select and make it and index.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-07-2011, 02:05 PM
Senior Member
 
Join Date: Apr 2008
Posts: 1,345
Default

You also have to adjust your coding to query the indexed part.
__________________
Health!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-10-2011, 11:19 PM
Senior Member
 
Join Date: Jan 2008
Posts: 898
Default

Go to PhPMyAdmin, go to the DB and then the table you want. Click on structure and then the line you want. One of the icons there will give the option to index.
__________________
Illness Info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-11-2011, 10:37 AM
Senior Member
 
Join Date: Apr 2008
Posts: 1,345
Default

You should also do a repair and optimize after just to make sure everything is working on optimal fashion.
__________________
Health!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-11-2011, 03:12 PM
geek's Avatar
Senior Member
 
Join Date: Apr 2008
Posts: 1,274
Default

The repair and optimize should be done regular and not just as part of an index.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-11-2011, 08:36 PM
Senior Member
 
Join Date: Apr 2008
Posts: 1,345
Default

Yes I agree with that. I know some people have a cron to do this automatically but I don't like doing it like that.
__________________
Health!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 03:38 PM.


Powered by: vBulletin
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15