On Fri, Sep 2, 2011 at 11:42 AM, Philip Martin
<philip.martin_at_wandisco.com> wrote:
> Hyrum K Wright <hyrum.wright_at_wandisco.com> writes:
>
>> sqlite> select * from sqlite_master where type = 'index' and
>> tbl_name = 'WCROOT';
>> index|sqlite_autoindex_WCROOT_1|WCROOT|8|
>> index|I_LOCAL_ABSPATH|WCROOT|9|CREATE UNIQUE INDEX I_LOCAL_ABSPATH
>> ON WCROOT (local_abspath)
>>
>> would both indicate there are two indices on the WCROOT table, though
>> we only define one. I believe one of these indices is due to the
>> UNIQUEness of the local_abspath column.
>
> Yes, that's why I think we can delete them. However we rarely write to
> these tables so the overhead of having the superfluous index is
> negligible. There is no real need to remove them from 1.7 if people
> would prefer to make a more minimal change for 1.7.
I do not know about SQLite, but in other databases I have worked with,
the database engine is intelligent enough to not create anything
superfluous in this sort of scenario where the index you want to
create already exists.
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on 2011-09-02 18:02:50 CEST