Need someone more familiar with the design philosophy and source code than I am 
(which is not at all).

<http://www.sqlite.org/foreignkeys.html#fk_indexes>

Says you need an index for anything which acts as a parent.  I can understand 
why under normal circumstances (large table) this would be desirable.  But is 
there anything which would /require/ it ?  I know that the lookup is needed, 
and if there's no suitable index it will be slower, but is the fact that one is 
required an artefact of how SQLite3 works, or a 100% necessary part of foreign 
keys ?

I'm asking this because I'm in a situation where someone may make a daughter 
table with a foreign key relationship and the code will not know whether the 
appropriate index already exists.  Either I can try to parse various pieces of 
information to figure it out, or I can have a rule that a new index is always 
created, and accept that this index may sometimes be a duplicate of one which 
already exists.

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

Reply via email to