> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ALTER RESOURCE GROUP

<a id="sql-rg-alter" />

Any of the following facets of a *resource group* can be altered, either
individually or as a group:

* Rank
* Tier limits
* Execution options

```sql title="ALTER RESOURCE GROUP Syntax" theme={null}
ALTER RESOURCE GROUP <resource group name>
[ RANK <FIRST | LAST | BEFORE <group name> | AFTER <group name>> ]
[
    TIER LIMITS
    (
        <tier name> USING (<tier property name> = <tier property value>[,...]),
        ...
        <tier name> USING (<tier property name> = <tier property value>[,...])
    )
]
[ WITH OPTIONS (<resource property name> = <resource property value>[,...]) ]
```

## Parameters

<AccordionGroup>
  <Accordion title="<resource group name>" id="<resource-group-name>" defaultOpen>
    Name of the [resource group](/content/rm/concepts#rm-concepts-resource-groups) to alter.
  </Accordion>

  <Accordion title="RANK" id="rank" defaultOpen>
    Designation of where in the ordering of applicable *resource groups* this one should exist.  For
    a given set of *resource groups*, the one that is ranked before all the others will be used.

    `RANK` designations include:

    <div>
      <table class="table w-full [&_td]:min-w-[150px] [&_th]:text-left [&_td[data-numeric]]:tabular-nums">
        <thead>
          <tr>
            <th>Keyword</th>
            <th>Description</th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <td><code>FIRST</code></td>
            <td>Make this *resource group* the new first one in the ordering.</td>
          </tr>

          <tr>
            <td><code>LAST</code></td>
            <td>Make this *resource group* the new last one in the ordering.</td>
          </tr>

          <tr>
            <td><code>BEFORE \<group name></code></td>
            <td>Place this *resource group* before the one specified by <code>group name</code> in the ordering.</td>
          </tr>

          <tr>
            <td><code>AFTER \<group name></code></td>
            <td>Place this *resource group* after the one specified by <code>group name</code> in the ordering.</td>
          </tr>
        </tbody>
      </table>
    </div>
  </Accordion>

  <Accordion title="TIER LIMITS" id="tier-limits" defaultOpen>
    Optional indicator that a set of [tier](/content/rm/concepts#rm-concepts-tiers) names and corresponding
    property assignments will follow.

    Parameters for each *tier* assignment are as follows:

    <div>
      <table class="table w-full [&_td]:min-w-[150px] [&_th]:text-left [&_td[data-numeric]]:tabular-nums">
        <thead>
          <tr>
            <th>Keyword</th>
            <th>Description</th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <td><code>tier name</code></td>
            <td>Name of the *tier* to which limits will be assigned: <div><table class="table w-full [&_td]:min-w-[150px] [&_th]:text-left [&_td[data-numeric]]:tabular-nums">  <thead>  <tr>    <th>Name</th>    <th>Description</th>  </tr>  </thead>  <tbody>  <tr>    <td><code>VRAM</code></td>    <td>Update the [VRAM tier](/content/rm/concepts#rm-concepts-tiers-vram).</td>  </tr>  <tr>    <td><code>RAM</code></td>    <td>Update the [RAM tier](/content/rm/concepts#rm-concepts-tiers-ram).</td>  </tr>  </tbody></table></div></td>
          </tr>

          <tr>
            <td><code>tier property name</code></td>
            <td>Name of the *tier* property to which a limit will be assigned: <div><table class="table w-full [&_td]:min-w-[150px] [&_th]:text-left [&_td[data-numeric]]:tabular-nums">  <thead>  <tr>    <th>Property</th>    <th>Description</th>  </tr>  </thead>  <tbody>  <tr>    <td><code>max\_memory</code></td>    <td>Maximum amount of memory per rank per GPU that can be used in the *VRAM tier*, or maximum amount of memory per rank that can be used in the *RAM tier*.</td>  </tr>  </tbody></table></div></td>
          </tr>

          <tr>
            <td><code>tier property value</code></td>
            <td>Value to assign the corresponding *tier* property.</td>
          </tr>
        </tbody>
      </table>
    </div>
  </Accordion>

  <Accordion title="WITH OPTIONS" id="with-options" defaultOpen>
    Optional indicator that a comma-delimited list of *resource group* property option/value
    assignments will follow.

    See [Options](/content/sql/resource_group/alter-resource-group#sql-rg-alter-opt) for the complete list of options.
  </Accordion>
</AccordionGroup>

<a id="sql-rg-alter-opt" />

## Options

The following options can be specified to further modify a *resource group*
configuration.

<AccordionGroup>
  <Accordion title="max_cpu_concurrency" id="max_cpu_concurrency" defaultOpen>
    Maximum number of simultaneous threads that will be used to execute a request, per rank.
    Must be >= *4*.
  </Accordion>

  <Accordion title="max_data" id="max_data" defaultOpen>
    Maximum amount of data, per rank, in bytes, that can be used by all database objects within this
    group; for example, a `max_data` of *1000000000* would limit a user with this *resource group*
    to a per-rank total of *1GB* of data usage across all tables, views, graphs, etc., including
    temporary objects supporting data processing operations (queries, materialized views, etc.).
  </Accordion>

  <Accordion title="max_scheduling_priority" id="max_scheduling_priority" defaultOpen>
    Maximum [scheduling priority](/content/rm/concepts#rm-concepts-scheduling-priority) of a task.
  </Accordion>

  <Accordion title="max_tier_priority" id="max_tier_priority" defaultOpen>
    Maximum [eviction priority](/content/rm/concepts#rm-concepts-eviction-priority) of a tiered object.
  </Accordion>

  <Accordion title="persist" id="persist" defaultOpen>
    Whether to save this change to the database configuration so that it will stay in effect after a
    database restart.  Default is `true`.
  </Accordion>
</AccordionGroup>

<a id="sql-rg-alter-ex" />

## Examples

To alter an existing **memory\_and\_execution** *resource group*,
moving it to the highest ranking, while assigning new limits for the *RAM tier*
and `max_cpu_concurrency` & `max_scheduling_priority` options, but leaving
other existing settings untouched:

```sql ALTER RESOURCE GROUP Example theme={null}
ALTER RESOURCE GROUP memory_and_execution
RANK FIRST
TIER LIMITS
(
    RAM USING (max_memory = 214748364800)
)
WITH OPTIONS
(
    max_cpu_concurrency = 9,
    max_scheduling_priority = 90
)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.