The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 21, 2019, 06:42:46 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: MySQL Indexes  (Read 1953 times)
m0nkeymafia
Expert
****
Offline Offline

Posts: 240


Check it!


View Profile
« on: September 09, 2007, 07:45:03 AM »

Just a quick one, cos its easy but may help some of the newer guys
When you add indexes to a table in mysql make sure you do it in the order that you use the data
i.e. if you do

WHERE field_a = '1' AND field_b = '4'

Make sure you index on field_a,field_b
if you do it the other way around then mysql wont use the index, so you gotta make sure when you write your queries to remember how you created the indexes

Simple but often overlooked

P.s. hot chocolate rocks for hangovers!! Mobster
Logged

I am Tyler Durden
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #1 on: September 12, 2007, 08:32:57 PM »

really? that is GAY

good to know, since I am delving into the netherworld of PHP/mysql.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!