def BestIndex(self, constraints, orderbys):
        constraints_used = []
        columns = []
        for i, (column_idx, comparison) in enumerate(constraints):
            # Instruct SQLite to pass the constraint value to the Cursor's
            # Filter() method.
            constraints_used.append(i)

            # We will generate a string containing the columns being filtered
            # on, otherwise our Cursor won't know which columsn the filter
            # values correspond to.
            columns.append(self._columns[column_idx])

        return [
            constraints_used,  # Indices of constraints we are interested in.
            0,  # The index number, not used by us.
            ','.join(columns),  # The index name, a list of filter columns.
            False,  # Whether the results are ordered.
            1000 if 'parent' in columns else 10000,  # Query cost.
        ]
Example query:
dataset/ETHPy150Open coleifer/peewee/examples/redis_vtable/redis_vtab.py/RedisTable.BestIndex