PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > Re: Indices in InnoDB/MySQL
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: Indices in InnoDB/MySQL

Réponse
 
LinkBack Outils de la discussion
Vieux 01/04/2008, 18h49   #1
Wm Mussatto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Indices in InnoDB/MySQL

On Tue, April 1, 2008 10:01, Robert DiFalco wrote:
> I've been told that an index always contains the primary key. So if I
> have a LONG ID that is the primary key of table and create on index on
> LONG VALUE, the index on LONG VALUE will actually work as a typical
> compound index on ID,VALUE. My question is this, if I don't know that
> about MySQL and create my indices on purpose (i.e. not taking into
> account implementation details about MySQL) I would create the index
> explicitly on ID,VALUE. If I did that would I effectively have the same
> index as one on just VALUE or would there some how be duplicate data in
> the ID,VALUE index (i.e. ID, ID, VALUE)?
>
> R.
>

Close but not quite there...
You should always have AN index which is the primary key. You can create
other indexes which don't. If you are searching for 'Value' then that
should be the index. If you do ID,VALUE it can't use the index AFAIK
because it won't know the ID.
------
William R. Mussatto
Systems Engineer
http://www.csz.com
909-920-9154




  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h03.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10837 seconds with 9 queries