Initial implementation of estimateSelectivity