List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:November 21 2000 6:31pm
Subject:Re: Index with condition? [A distant idea]
View as plain text  
Hi!

>>>>> "barries" == barries  <barries@stripped> writes:

barries> On Tue, Nov 21, 2000 at 08:47:00AM -0700, sasha@stripped wrote:
>> >        UNIQUE ( person_id, ident_doc_type ) WHERE valid_to IS NULL
>> 
>> Monty - I think it is a good idea, and should not be too hard to do - you just
>> check the expr before you update the key, and check it again before doing a key
>> read - is there anything else involved, other than storing/retrieving the expr?

barries> Is this the start of computed function indexes (I hope)?

No;  Computed index are in a sence easier to handle than this :)

The problems with computed index are:

- You can't use a standalone tool like myisamchk to check the table.
- It will be a problem for the optimizer to pattern-match the query
  for when to use the index.

Regards,
Monty
Thread