Submit Search
Upload
TypeORM으로 보는 마이그레이션과 N+1 문제
•
0 likes
•
201 views
Yangwook Jeong
Follow
- 마이그레이션과 N+1 문제 소개 - sequelize와 typeorm에서의 기능 비교 - 타 플랫폼 ORM과의 기능 비교
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 36
Download now
Download to read offline
Recommended
From Config Management Sucks to #cfgmgmtlove
From Config Management Sucks to #cfgmgmtlove
Kris Buytaert
Railsフロントエンドの modernizeにおける一事例 ~decaffeinateからES2015移行まで~
Railsフロントエンドの modernizeにおける一事例 ~decaffeinateからES2015移行まで~
treby
Swift Optional ??
Swift Optional ??
Chihyang Li
SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and models
Korea Sdec
Dazzing Data Depiction with D3.JS
Dazzing Data Depiction with D3.JS
Eric Carlisle
Developing With Django
Developing With Django
Daniel Ryan
Mongo NYC PHP Development
Mongo NYC PHP Development
Fitz Agard
Torquebox rubyhoedown-2012
Torquebox rubyhoedown-2012
Lance Ball
Recommended
From Config Management Sucks to #cfgmgmtlove
From Config Management Sucks to #cfgmgmtlove
Kris Buytaert
Railsフロントエンドの modernizeにおける一事例 ~decaffeinateからES2015移行まで~
Railsフロントエンドの modernizeにおける一事例 ~decaffeinateからES2015移行まで~
treby
Swift Optional ??
Swift Optional ??
Chihyang Li
SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and models
Korea Sdec
Dazzing Data Depiction with D3.JS
Dazzing Data Depiction with D3.JS
Eric Carlisle
Developing With Django
Developing With Django
Daniel Ryan
Mongo NYC PHP Development
Mongo NYC PHP Development
Fitz Agard
Torquebox rubyhoedown-2012
Torquebox rubyhoedown-2012
Lance Ball
Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORM
Ortus Solutions, Corp
The Weather of the Century
The Weather of the Century
MongoDB
Nu Skin: Integrating the Day CMS with Translation.com
Nu Skin: Integrating the Day CMS with Translation.com
Day Software
Rupher = Ruby + Gopther
Rupher = Ruby + Gopther
Aleksandr Simonov
Rupher
Rupher
Amoniac OÜ
Real time collaborative text editing, by Miroslav Hettes, Smarkup
Real time collaborative text editing, by Miroslav Hettes, Smarkup
Smarkup
Reactive Xamarin. UA Mobile 2016.
Reactive Xamarin. UA Mobile 2016.
UA Mobile
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlassian
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlassian
Python教程 / Python tutorial
Python教程 / Python tutorial
ee0703
從零開始的爬蟲之旅 Crawler from zero
從零開始的爬蟲之旅 Crawler from zero
Shi-Ken Don
ORM Pink Unicorns
ORM Pink Unicorns
Ortus Solutions, Corp
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
Heejong Ahn
MongoDB In Production At Sailthru
MongoDB In Production At Sailthru
ibwhite
Pairjour
Pairjour
Taylor Luk
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
David Neal
GO programming language
GO programming language
tung vu
Dynamic Sound for iOS Apps and Games
Dynamic Sound for iOS Apps and Games
Tack Mobile
Trending with Purpose
Trending with Purpose
Jason Dixon
分散型Stablecoin "Dai" の仕組み
分散型Stablecoin "Dai" の仕組み
Hiro Inagaki
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
JohnWilliam111370
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
NainaShrivastava14
More Related Content
Similar to TypeORM으로 보는 마이그레이션과 N+1 문제
Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORM
Ortus Solutions, Corp
The Weather of the Century
The Weather of the Century
MongoDB
Nu Skin: Integrating the Day CMS with Translation.com
Nu Skin: Integrating the Day CMS with Translation.com
Day Software
Rupher = Ruby + Gopther
Rupher = Ruby + Gopther
Aleksandr Simonov
Rupher
Rupher
Amoniac OÜ
Real time collaborative text editing, by Miroslav Hettes, Smarkup
Real time collaborative text editing, by Miroslav Hettes, Smarkup
Smarkup
Reactive Xamarin. UA Mobile 2016.
Reactive Xamarin. UA Mobile 2016.
UA Mobile
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlassian
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlassian
Python教程 / Python tutorial
Python教程 / Python tutorial
ee0703
從零開始的爬蟲之旅 Crawler from zero
從零開始的爬蟲之旅 Crawler from zero
Shi-Ken Don
ORM Pink Unicorns
ORM Pink Unicorns
Ortus Solutions, Corp
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
Heejong Ahn
MongoDB In Production At Sailthru
MongoDB In Production At Sailthru
ibwhite
Pairjour
Pairjour
Taylor Luk
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
David Neal
GO programming language
GO programming language
tung vu
Dynamic Sound for iOS Apps and Games
Dynamic Sound for iOS Apps and Games
Tack Mobile
Trending with Purpose
Trending with Purpose
Jason Dixon
分散型Stablecoin "Dai" の仕組み
分散型Stablecoin "Dai" の仕組み
Hiro Inagaki
Similar to TypeORM으로 보는 마이그레이션과 N+1 문제
(20)
Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORM
The Weather of the Century
The Weather of the Century
Nu Skin: Integrating the Day CMS with Translation.com
Nu Skin: Integrating the Day CMS with Translation.com
Rupher = Ruby + Gopther
Rupher = Ruby + Gopther
Rupher
Rupher
Real time collaborative text editing, by Miroslav Hettes, Smarkup
Real time collaborative text editing, by Miroslav Hettes, Smarkup
Reactive Xamarin. UA Mobile 2016.
Reactive Xamarin. UA Mobile 2016.
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Atlas Hugged: How Atlassian Tools Enabled a Software Internalization Team
Python教程 / Python tutorial
Python教程 / Python tutorial
從零開始的爬蟲之旅 Crawler from zero
從零開始的爬蟲之旅 Crawler from zero
ORM Pink Unicorns
ORM Pink Unicorns
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
MongoDB In Production At Sailthru
MongoDB In Production At Sailthru
Pairjour
Pairjour
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
GO programming language
GO programming language
Dynamic Sound for iOS Apps and Games
Dynamic Sound for iOS Apps and Games
Trending with Purpose
Trending with Purpose
分散型Stablecoin "Dai" の仕組み
分散型Stablecoin "Dai" の仕組み
Recently uploaded
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
JohnWilliam111370
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
NainaShrivastava14
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
mohitesoham12
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
sahilsajad201
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
Sneha Padhiar
Main Memory Management in Operating System
Main Memory Management in Operating System
Rashmi Bhat
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
Erbil Polytechnic University
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
Erbil Polytechnic University
Research Methodology for Engineering pdf
Research Methodology for Engineering pdf
CaalaaAbdulkerim
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
ChristianCDAM
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
jhunlian
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
Romil Mishra
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
BootNeck1
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
HafizMudaserAhmad
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
Mebane Rash
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Manish Kumar
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
Drew Moseley
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
Sneha Padhiar
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
rnrncn29
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
sandhya757531
Recently uploaded
(20)
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
Main Memory Management in Operating System
Main Memory Management in Operating System
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
Research Methodology for Engineering pdf
Research Methodology for Engineering pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
TypeORM으로 보는 마이그레이션과 N+1 문제
1.
Ian - 20.11.2020 ORM(Object
Relational Mapper) Migration & N+1 Problem
2.
• • •
TypeORM • TypeORM vs. Sequelize • ORM • N+1 • & • TypeORM vs. Sequelize • ORM TOC
3.
Migration Sequelize ? git vcs migration
. migration , . migration . Migration (up), (down) .
4.
Migration • sequelize orm
• orm models, migrations, seeders • model, migration ORM ??
5.
Migration • up, down •
? ? • migration ! Src/models/department.js Src/migrations/timestamp-department.js
6.
Migration • • People.city
country
7.
Migration • sequelize, typeorm
• if (isSync) • city country !
8.
Migration • ? country
9.
Migration • • !
10.
Migration • •
11.
Migration • , • synchronize ! •
association • migration
12.
Migration • config ..
.. • https://github.com/Yangeok/Today-I-learned/blob/master/ getting_ready_posting/2020-11-18-typeorm-theoritical.md • Migration:create, migration:generate, migration:run, migration:revert 4 !
13.
Migration : Migration:create • Migration
• Create
14.
Migration : Migration:generate • Migration
• generate !
15.
Migration : Migration:run • Migartion
• Migration up • ( ) up migrations •
16.
Migration : Migration:revert • •
Migration down • (LIFO) • Migrations row • Migration:revert:all typeorm
17.
Migration TypeORM vs. Sequelize:
migration • Sequelize • Entity Migration • Migration:generate typeorm migration:create • Migration:undo:all • typeorm • Entity migration migration:generate • schema:sync • Migration:revert migration
18.
Migration TypeORM vs. Sequelize:
seeding • Sequelize • typeorm
19.
Migration TypeORM vs. Sequelize •
Sequelize • migration:undo:all migration . • seeding cli up, down . • Typeorm • migration . • cli synchronize .
20.
Migration ORM : Doctrine
(PHP) • migration . • sequelize umzug migration hook cli .
21.
Migration ORM : Active
record (Ruby) • typeorm active record . • migration . • timestamp YYYYMMDDHHMMSS . ( : 20201120120000_test-migration-create.rb)
22.
N+1 & • orm •
2 , 1 N N+1 • Orm • N+1 raw sql
23.
N+1 & • People Companies
• Companies People 1:M !
24.
N+1 & • Select !
25.
N+1 & • People Companies.department
• ! 6(1+5) <- N+1
26.
N+1 & • join N+1
! • People
27.
N+1 & : Eager
loading • join !
28.
N+1 & : Eager
loading • • • • , • • Orders OrderDetails, Delivery , n+1 eager loading
29.
N+1 & : Lazy
loading • join n+1 lazy loading
30.
N+1 & : Lazy
loading • • ( db ..) • cpu • … • • sns • Eager loading • Lazy loading !
31.
N+1 Problem TypeORM vs.
Sequelize • typeorm eager loading . (Optional / eager loading) • lazy loading Promise generic type • . Eager loading Lazy loading
32.
N+1 Problem TypeORM vs.
Sequelize • sequelize find Include eager loading . ( lazy loading) • join . lazy loading include . Eager loading lazy loading
33.
N+1 Problem ORM :
CakeORM (PHP) • eager loading . contain . • lazy loading .
34.
N+1 Problem ORM :
JPA (Java) • eager loading . FetchType.EAGER . • lazy loading . FetchType.LAZY .
35.
N+1 Problem ORM :
Active record (Ruby) • eager loading . sequelize includes . • lazy loading .
36.
EOF ,
Download now