---
title: "Materialize Result Set"
description: "The materialize-hint forces materialization of the result set from a query."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/execution-hints/materialize-result-set
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/execution-hints/materialize-result-set
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> materializeResultSet
    materializeResultSet -->| | MATERIALIZE:::quoted
    MATERIALIZE --> End((END))
```

## Purpose
The `materialize`-hint forces materialization of the result set from a query. It is typically used to increase performance of uncorrelated sub-queries to avoid repeated calculation of the same result set.

## Examples
The sub-query on `in` is executed only one time using `materialize`:
```sql
select *
from   ExactOnlineREST..Accounts
where  Id 
       in 
       ( select /*+ materialize */ AccountId 
         from   MyCustomerTable@postgresql
       )
```