Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ildus committed Dec 18, 2018
1 parent b1a4d0d commit efac7c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ select query_hash from sr_plans where query_hash=1000+_p(11);
select query_hash from sr_plans where query_hash=1000+_p(-5);
```

## Explain
## EXPLAIN for saved plans

It is possible to see saved plans by using `show_plan` function. It requires
knowing query hash which could be fetched from `sr_plans` table.

Examples:

Show enabled plan for query hash:

```SQL
SELECT show_plan(1);
show_plan
Expand All @@ -86,7 +88,7 @@ SELECT show_plan(1);
(3 rows)
```

Get second plan:
Get second saved plan by using `index` parameter (ignores `enable` attribute):

```SQL
SELECT show_plan(1, index := 2);
Expand All @@ -98,7 +100,7 @@ SELECT show_plan(1, index := 2);
(3 rows)
```

Use another output format (supported formats are `json`, `text`, `xml`):
Use another output format (supported formats are `json`, `text`, `xml`, `yaml`):

```SQL
SELECT show_plan(1, format := 'json');
Expand Down

0 comments on commit efac7c3

Please sign in to comment.