프로시저 언제 사용해야 하나?

2019. 10. 22. 16:59·Database/MySQL
반응형

The benefits of using stored procedures in SQL Server rather than application code stored locally on client computers include:

  1. They allow modular programming.

  2. They allow faster execution.

  3. They can reduce network traffic.

  4. They can be used as a security mechanism.

 


 

Determine when to use stored procedures vs. SQL in the code

Stored procedures in SQL Server are similar to procedures in other programming languages in that they can:

  • Accept input parameters and return multiple values in the form of output parameters to the calling procedure or batch.

  • Contain programming statements that perform operations in the database, including calling other procedures.

  • Return a status value to a calling procedure or batch to indicate success or failure (and the reason for failure).

 

You can create a stored procedure once, store it in the database, and call it any number of times in your program. Someone who specializes in database programming may create stored procedures; this allows the application developer to concentrate on the code instead of SQL. 

 

728x90
반응형
'Database/MySQL' 카테고리의 다른 글
  • Isolation level (트랜잭션 고립(격리) 수준)
  • MySQL's Storage Engines - InnoDB Engine
  • 트랜잭션 너는 누구니?
  • MySQL's Storage Engies - MyISAM Engine
상쾌한기분
상쾌한기분
  • 상쾌한기분
    상쾌한기분
    상쾌한기분
  • 전체
    오늘
    어제
    • 분류 전체보기 (251)
      • Python (44)
        • Python (26)
        • Django (6)
        • Flask (4)
        • Open Source (6)
      • Kotlin & Java (5)
        • Spring (2)
        • 프로젝트 (1)
      • Go (11)
      • Database (24)
        • MySQL (21)
        • Redis (3)
      • Infrastructure (2)
        • CDC (4)
        • Kafka (5)
        • Prometheus (2)
        • Fluentd (11)
        • Docker (1)
        • Airflow (2)
        • VPN (2)
      • IT (26)
        • AI (9)
        • Langchain (8)
        • Web (18)
        • Git (8)
        • 리팩토링 (9)
        • Micro Service Architecture (8)
        • Clean Code (16)
        • Design Pattern (0)
        • 수학 (1)
        • 알고리즘 (14)
      • OS (14)
        • Centos (10)
        • Ubuntu (3)
        • Mac (1)
      • Search Engine (2)
        • ElasticSearch (1)
        • Lucene Solr (1)
      • PHP (2)
        • Laravel (1)
        • Codeigniter (1)
  • 블로그 메뉴

    • Github 방문
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    python
    티스토리챌린지
    Kafka
    go
    performance
    LLM
    docker
    prompt
    오블완
    파이썬
    백준
    MYSQL
    Redis
    ollama
    Golang
    http
    Langchain
    git
    fluentd
    CDC
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
상쾌한기분
프로시저 언제 사용해야 하나?
상단으로

티스토리툴바