On 17 May 2017, at 7:07pm, Joseph L. Casale <jcas...@activenetwerx.com> wrote:

> So I have one query which if I expect if I encounter will be painful:
> 
> UPDATE AdAttribute
>     SET Value = @NewValue
>   WHERE Type = @Type
>         AND Value = @Value;
> 
> I may pass member or memberOf to @type, without the indexes this will be 
> abysmal.
> I don't expect to see this often and I don't have data that requires it in my 
> large data set.

In this case your two separate indexes, one on Type and one on Value, will not 
provide much help.  The ideal index for this case is the combination one on 
(Type, Value).  Creating this instead of the two you listed, will dramatically 
speed up the UPDATE command, and reduce the INSERT time and size of the 
database.

In terms of the other things you mentioned, I see nothing obvious you’ve missed 
and I think you have enough information to proceed.

Simon.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to