1. A method of estimating selectivity of a base table predicate, the method comprising: receiving a database query, the query comprising one or more query predicates and referencing one or more database tables; identifying one or more join indexes, the join index(es) defined on respective database tables referenced by the database query, the join index(es) comprising one or more join index predicates; calculating the row count selected by the query predicates at least partly using the row count or statistics of the one or more join indexes ; and calculating the selectivity of the base table predicate at least partly from the calculated row count.