---
title: "\uC870\uC778 \uC138\uD2B8"
description: "join_set \uD78C\uD2B8\uB294 \uB450 \uB370\uC774\uD130 \uC18C\uC2A4 \uAC04\uC758 \uC870\uC778 \uBC29\uC2DD\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4."
language: ko
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ko/docs/invantive-universalsql/execution-hints/join-set
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/execution-hints/join-set
updated: 2026-12-04T11:59:23Z
license: https://documentation.invantive.eu/ko/
---

## 구문
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    stmt_start((START))
    stmt_start --> stmt_0_0[JOIN_SET]:::quoted
    stmt_0_0 --> stmt_0_1["("]:::quoted
    stmt_0_1 --> stmt_0_2[<a href="Invantive UniversalSQL/General/Identifiers" class="internal-link">identifier</a>]
    stmt_0_2 --> stmt_0_7
    stmt_0_2 --> stmt_0_3[","]:::quoted
    stmt_0_3 --> stmt_0_4[<a href="Invantive UniversalSQL/General/Identifiers" class="internal-link">identifier</a>]
    stmt_0_4 --> stmt_0_7
    stmt_0_4 --> stmt_0_5[","]:::quoted
    stmt_0_5 --> stmt_0_6[numericConstant]
    stmt_0_6 --> stmt_0_7[")"]:::quoted
    stmt_0_7 --> stmt_end((END))
```

## 목적
`join_set` 힌트는 두 데이터 소스 간의 조인 방식을 제어합니다. 왼쪽 피연산자의 행 수가 힌트에 지정된 최대 행 수를 초과하지 않으면, 전체 테이블 스캔 대신 `IN` 열 값 조회가 사용됩니다. 지정하지 않으면, 왼쪽 행 수가 5.000 행을 초과하지 않는 경우에만 `IN` 열 값 조회가 사용됩니다.

해시 조회의 실제 구현은 데이터 컨테이너가 실행되는 플랫폼에 따라 달라집니다:
- OData에서는 제한된 수의 IN 값을 갖는 `in` 구문을 사용하여 여러 번의 요청이 수행됩니다.
- 관계형 데이터베이스 플랫폼에서는 네이티브 SQL `in`이 사용됩니다.

첫 번째 식별자는 조인의 오른쪽에 있는 테이블의 별칭입니다. 두 번째 식별자는 오른쪽에서 조인에 사용되는 열의 이름입니다. 숫자 상수는 조인 왼쪽의 행 수가 최대 몇 개까지일 때 조인 세트 힌트를 사용할 수 있는지를 지정합니다. 조인 왼쪽의 행 수가 숫자 상수를 초과하면 전체 테이블 조인이 수행됩니다.

## 예시
다음 예제는 5.000개의 판매 송장을 100.000개의 판매 송장이 있는 Exact Online 환경에서 가져옵니다. 각 판매송장에는 4개에서 10개 사이의 라인이 있습니다. 이 조인은 모든 판매송장이나 모든 송장 라인을 가져오지 않고, 대신 where 절을 사용하여 판매송장 5.000건을 가져온 다음, `InvoiceId`를 기준으로 열 값 `IN` 조회를 사용하여 관련 송장 라인을 가져옵니다. Exact Online은 OData 소스이므로, 약 30.000개의 송장 라인은 각각 `InvoiceId`에 대해 100개 라인의 IN 구문을 갖는 300회의 세션 I/O로 가져옵니다.
```sql
select /*+ join_set(sil, invoiceid, 10000) */ *
from   ExactOnlineREST..SalesInvoices sik
join   ExactOnlineREST..SalesInvoiceLines sil
on     sil.invoiceid = sik.invoiceid
where  sik.status = 50
and    sik.InvoiceDate >= to_date( :P_RECEIPT_DATE_FROM, 'YYYYMMDD') 
and    sik.InvoiceDate <= to_date( :P_RECEIPT_DATE_TO, 'YYYYMMDD')
```

