Hi.

On Tue, Mar 27, 2001 at 08:22:39PM +0100, [EMAIL PROTECTED] wrote:
> > -----Original Message-----
> > From: Benjamin Pflugmann [mailto:[EMAIL PROTECTED]]
[...]
> > > Aha, I'll have to test more with the individual order of 
> > combined indexes to
> > > see what I can get from it.
> > 
> > Well, normally that is not really important, but in your case,
> > processname has a low cardinality and therefore one value has a lot of

I think I mixed it up and actually you said that username has only few
different values.

> > matches in the index and it is worth a try to put it to the right. 
> 
> So the lower the cardinality the more to the right in a combined index ?

Yes, I think so.

But let me emphasize it again: Usually you need not to care about
this, but only if the ratio of Cardinality / amount of rows is
magnitudes lower than for other columns (and it sounded as this is the
case for username).

On the other hand, I only happened to come across this twice (I mean,
that changing the order of combined index resulted in an speed
increase), and I don't know too much about the internals of the trees
used in the MySQL indexes, so take this with a grain of salt.

I think, it is of interest, what the Cardinality of the sub key is,
i.e. if you only have 20 different usernames, but system_id splits
them up (i.e. only 20 entries for each system_id), of course, you
don't need to think about.

But you it probably works with 20 different usernames, which each
'contain' 10000 system_id's. Then it's better to start with the
system_id, I think. Someone may want to correct me, if I am mistaken.

Just try if it helps, and if not, ignore my suggestion.

[...]
> I'll try. Tonight I'm going for system_id, processname, timecode
> 
> I will probably make the next tests on the disk table, since recreating
> indexes and analyzing/optimizing on the process table takes too many hours.
> The disk table only takes 20 minutes.

Good idea. 

[...]
> On a side note, with 3.22.32 I have some weird memory allocation problems.
[some Tru64 stuff deleted]

Sorry, but I cannot help with that, someone else hopefully can answer this.

Bye,

        Benjamin.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to