Add CDB_EstimateRowCount function

See #295
This commit is contained in:
Javier Goizueta
2017-04-07 15:35:48 +02:00
parent 795d92da8d
commit a486eed2e3
6 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
Estimate the number of rows of a query.
#### Using the function
```sql
SELECT CDB_EstimateRowCount($$
UPDATE addresses SET the_geom = cdb_geocode_street_point(addr, city, state, 'US');
$$) AS row_count;
```
Result:
```
row_count
-----------
5
(1 row)
```
#### Arguments
CDB_EstimateRowCount(query)
* **query** text: the SQL query to estimate the row count for.