[llvm-commits] [zorg] r146876 - /zorg/trunk/lnt/lnt/server/db/testsuitedb.py

Daniel Dunbar daniel at zuster.org
Mon Dec 19 09:11:32 PST 2011


Author: ddunbar
Date: Mon Dec 19 11:11:32 2011
New Revision: 146876

URL: http://llvm.org/viewvc/llvm-project?rev=146876&view=rev
Log:
[lnt/v0.4] lnt.server.db: Eliminate an unnecessary index (and add a future
FIXME).

Modified:
    zorg/trunk/lnt/lnt/server/db/testsuitedb.py

Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146876&r1=146875&r2=146876&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 11:11:32 2011
@@ -136,7 +136,9 @@
             __tablename__ = db_key_name + '_Sample'
 
             id = Column("ID", Integer, primary_key=True)
-            run_id = Column("RunID", Integer, ForeignKey(Run.id), index=True)
+            # We do not need an index on run_id, this is covered by the compound
+            # (Run(ID),Test(ID)) index we create below.
+            run_id = Column("RunID", Integer, ForeignKey(Run.id))
             test_id = Column("TestID", Integer, ForeignKey(Test.id), index=True)
 
             run = sqlalchemy.orm.relation(Run)
@@ -144,6 +146,11 @@
 
             # Dynamically create fields for all of the test suite defined sample
             # fields.
+            #
+            # FIXME: We might want to index some of these, but for a different
+            # reason than above. It is possible worth it to turn the compound
+            # index below into a covering index. We should evaluate this once
+            # the new UI is up.
             class_dict = locals()
             for item in test_suite.sample_fields:
                 if item.name in class_dict:





More information about the llvm-commits mailing list