def build_index(cursor, column, tables):
    """Build an index on `column` for each table in `tables`"""
    if not type(tables) == list:
        tables = [tables]
    for table in tables:
        cursor.execute('CREATE INDEX IF NOT EXISTS %s_%s_index ON %s(%s);' %
            (table, column, table, column))
