On 9 Feb 2011, at 7:32pm, Black, Michael (IS) wrote: > Didn't we just determine a couple of days ago that triggers were performance > killers? > > That's one reason I want to avoid those.
Okay, then since your program knows the logic of how that table will be used, it can do it for itself. Just do two INSERTS. Alternatively, if your language is capable of it, simply well-order the two personIDs, so that the one in one column is always smaller than the one in the other column. Then change your SELECT logic so that it returns the UNION of SELECTing on both columns. One system speeds up the INSERTs, the other speeds up the SELECTs. It depends which is the more important to you. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users