Project

General

Profile

« Previous | Next » 

Revision 3164

sql.py: add_index(): Don't create index columns for nullable columns, because they require indexes to be created on all columns in order to use a distinct_table() temp table. Also, now that we are no longer using LEFT JOINs, the COALESCE call would only be evaluated once (in the plain JOIN) in the event that PostgreSQL doesn't use an index on a COALESCE expression.

View differences:

lib/sql.py
1096 1096
        
1097 1097
        # Handle nullable columns
1098 1098
        if ensure_not_null_:
1099
            try: expr = ensure_not_null(db, expr)
1099
            try: expr = sql_gen.ensure_not_null(db, expr)
1100 1100
            except KeyError: pass # unknown type, so just create plain index
1101 1101
        
1102 1102
        # Extract col

Also available in: Unified diff