On Sat, Sep 11, 2010 at 2:05 PM, Cory Nelson <phro...@gmail.com> wrote:
> On Sat, Sep 11, 2010 at 12:36 AM, Max Vlasov <max.vla...@gmail.com> wrote: > > Hi, > > > > What other observations can be made about these two types of solutions > that > > I may face in the future? > > Both are commonly used in the wild. Indexes have the added bonus over > triggers that you'll have less of your own code to test and maintain, > so I usually end up using them if I can. I reserve triggers for more > complex operations. SQL Server even has another option -- an indexed > view. > > Cory, thanks, just wondering, is the nature of the index internals is a part of SQL standard or just a common sense. For example, I can imagine real example when the space used is not a big problem so index could contain other non-indexed fields just for benefits of returning them without necessity to query the main table. Also (unlikely really used, but theoretically possible) minimalistic approach to space when only rowids (or equivalent) is saved and every operation including comparision operation requires querying the main table by rowid. It seems that in the first case the benefits of the index for faster loading will be completely lost. Max _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users