Skip to content

Commit

Permalink
enable timing on SQL queries
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbr committed Jan 10, 2025
1 parent f83bdba commit afa612e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions evaluation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ psql -U postgres -d spatialjoin_db -c "\dt+ public.${NAME}*"
psql -U postgres -d spatialjoin_db -c "\di+ public.${NAME}*"
```

The following commands compute the complete spatial self-join and output its
size. The first command only computes the number of candidate pairs (that is,
The following commands compute the complete spatial self-join, output its
size and reports the query time. The first command only computes the number of candidate pairs (that is,
the number of pairs of geometries that have a bounding box overlap). The second
command computes the exact number of pairs that intersect.

```
psql -U postgres -d spatialjoin_db -c "SELECT COUNT(*) FROM ${NAME} AS a, ${NAME} AS b WHERE a.geom && b.geom;"
psql -U postgres -d spatialjoin_db -c "SELECT COUNT(*) FROM ${NAME} AS a, ${NAME} AS b WHERE ST_Intersects(a.geom, b.geom);"
psql -U postgres -d spatialjoin_db -c "\timing" -c "SELECT COUNT(*) FROM ${NAME} AS a, ${NAME} AS b WHERE a.geom && b.geom;"
psql -U postgres -d spatialjoin_db -c "\timing" -c "SELECT COUNT(*) FROM ${NAME} AS a, ${NAME} AS b WHERE ST_Intersects(a.geom, b.geom);"
```

## Create table for complete OSM data
Expand Down

0 comments on commit afa612e

Please sign in to comment.