public function distinct($tableSpecId, $fieldName, array $filter=[])
    {
        $t = new \Tripod\Timer();
        $t->start();

        $filter['_id.'._ID_TYPE] = $tableSpecId;

        $collection = $this->config->getCollectionForTable($this->storeName, $tableSpecId, $this->readPreference);
        $results = $collection->distinct($fieldName, $filter);

        $t->stop();
        $query = array('distinct'=>$fieldName, 'filter'=>$filter);
        $this->timingLog(MONGO_TABLE_ROWS_DISTINCT, array('duration'=>$t->result(), 'query'=>$query, 'collection'=>TABLE_ROWS_COLLECTION));
        $this->getStat()->timer(MONGO_TABLE_ROWS_DISTINCT.".$tableSpecId",$t->result());
        return array(
            "head"=>array(
                "count"=>count($results)
            ),
            "results"=>$results
        );
    }