Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/guides/pages/cbo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ For more information and examples, refer to xref:n1ql:n1ql-manage/query-settings
Before you can use the Cost-Based Optimizer with a query, you must first gather the statistics that it needs.
The Query service automatically gathers statistics whenever an index is created or built, and you can update statistics at any time.

You can also configure a scheduled task to automatically check and update statistics using xref:n1ql:n1ql-language-reference/auto-update-statistics.adoc[Auto Update Statistics (AUS)].
During the scheduled window, AUS evaluates the existing statistics and updates them if they are outdated.
For more information on how to enable this feature and set the schedule, see xref:n1ql:n1ql-language-reference/auto-update-statistics.adoc#enable-and-schedule-aus[Enable and Schedule AUS].

include::n1ql:page$n1ql-language-reference/statistics-expressions.adoc[tags=overview]

=== Updating Statistics for Expressions
Expand Down Expand Up @@ -220,6 +224,7 @@ Explanation:
Reference:

* xref:n1ql:n1ql-language-reference/updatestatistics.adoc[UPDATE STATISTICS]
* xref:n1ql:n1ql-language-reference/auto-update-statistics.adoc[Auto Update Statistics]

Administrator guides:

Expand Down
1 change: 1 addition & 0 deletions modules/n1ql/pages/advanced.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The cost-based optimizer takes into account the cost of memory, CPU, network tra

* xref:n1ql:n1ql-language-reference/cost-based-optimizer.adoc[]
* xref:guides:cbo.adoc[]
* xref:n1ql:n1ql-language-reference/auto-update-statistics.adoc[]

== {sqlpp} Support for Couchbase Transactions

Expand Down
16 changes: 15 additions & 1 deletion modules/n1ql/pages/n1ql-intro/sysinfo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ a| [%hardbreaks]
<<sys-transactions,system:transactions>>
<<sys-sequences,system:sequences>>
<<sys-all-sequences,system:all-sequences>>
xref:n1ql:n1ql-language-reference/auto-update-statistics.adoc#system_aus[system:aus]
xref:n1ql:n1ql-language-reference/auto-update-statistics.adoc#system_aus_settings[system:aus_settings]
|===

== Authentication and Client Privileges
Expand Down Expand Up @@ -1356,6 +1358,8 @@ This catalog contains the following attributes:
__required__
|The class of the task.

For tasks related to xref:n1ql:n1ql-language-reference/auto-update-statistics.adoc[Auto Update Statistics (AUS)], the class is `auto_update_statistics`.

*Example*: ``advisor``
|string

Expand Down Expand Up @@ -1383,7 +1387,17 @@ __required__
__required__
|The state of the task.

*Values*: `scheduled`, `cancelled`, `completed`
Possible values are:
--
* `scheduled`: The task is scheduled and yet to run.
* `deleting`: The scheduled task is in the process of being cancelled.
* `cancelled`: The task was cancelled before it began executing.
* `running`: The task is currently executing.
* `aborting`: The running task is in the process of being aborted.
* `aborted`: The task was aborted while it was running.
* `completed`: The task completed successfully without being cancelled or aborted.
--

|string

|**subClass** +
Expand Down
Loading