Skip to content

Commit

Permalink
Add ANALYZE command
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsinger committed Nov 10, 2022
1 parent f63abe5 commit e63309c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,14 @@ Load a sky map for LIGO/Virgo event [GW200115_042309] ([S200115j]) into the

```

Last, run [`ANALYZE`](https://www.postgresql.org/docs/current/sql-analyze.html)
to prepare the data for use:

```pycon
>>> session.execute('ANALYZE')

```

### Sample Queries

#### What is the area of each field?
Expand Down
1 change: 1 addition & 0 deletions healpix_alchemy/tests/benchmarks/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def bench(benchmark, session):

def _func(query):
session.execute('ANALYZE')
return benchmark(lambda: session.execute(query).all())

return _func
Expand Down

0 comments on commit e63309c

Please sign in to comment.