SlideShare a Scribd company logo
1 of 8
DURATION
www.infiniflux.com
Table of Contents
DURATION Concept
DURATION Basic
DURATION BEFORE
DURATION FROM/TO
DURATION AFTER
1
2
3
4
5
DURATION Demo6
DURATION Concept
3
• 현재부터 10분 동안의 과거 데이터를 조회하는 SQL QUERY의 단순성 비교
DURATION은 SELECT 구문에서 시간 구간을 쉽게 지정할 수 있는 키워드
물리적인 데이터의 접근 범위를 좁혀서 SELECT 수행 성능에 매우 큰 영향을 미침
사용자 생성 시간 칼럼이 아닌 자동 생성되는 내부 칼럼인 _arrival_time 기준
데이터의 실시간 저장DURATION Time_Expression [ BEFORE|AFTER Time_Expression | TO_DATE(TIME)];
Time_Expression : all | year | month | day | hour | minute | second
RDBMS
SELECT * FROM t1 WHERE start_time > TO_DATE(‘2015-08-
01 20:50:00’, ‘YYYY-MM-DD HH24:MI:SS’);
InfiniFlux
SELECT * FROM t1 DURATION 10 minute;
DURATION Basic
4
: 현재부터 과거로 10분간 시간의 역방향으로 데이터를 조회하고 시간의 역순으로 출력함.
현재 시점을 기준으로 과거로 지정된 시간 범위만큼 시간의 역순으로 데이터를 검색
SELECT * FROM t1 DURATION 10 minute;
Past
10 minute data
Scan direction
Now(Now – 10 minutes)
DURATION BEFORE
5
: 1시간 전 기준으로 10분간의 과거 데이터를 조회하고 시간의 역순으로 출력
: 2015년 5월 12일 15시 기준으로 10분간의 과거 데이터를 조회하고 시간의 역순으로 출력
BEFORE는 “시간의 역방향” 즉, 현재부터 과거 방향으로 데이터를 검색하고 출력
상대적 또는 절대적 시작 시점을 지정하는데 사용
Past Now(now – 1 hour)(now – 1 hour – 10 minute)
Scan direction
10 minute data 1 hour
SELECT * FROM t1 DURATION 10 minute BEFORE 1 hour;
Past Now2015-05-12 15:00:002015-05-12 14:50:00
Scan direction
SELECT * FROM t1 DURATION 10 minute BEFORE TO_DATE(‘2015-05-12 15:00:00’, ‘YYYY-MM-DD HH24:MI:SS’);
10 minute data Time gap
DURATION AFTER
6
입력된 모든 데이터를 과거부터 현재순으로 출력하고자 하는 경우
SELECT * FROM t1 DURATION ALL AFTER TO_DATE(‘1970-01-01 09:00:00’, ‘YYYY-MM-DD HH24:MI:SS’);
: 2015년 5월 12일 15시를 기준으로 현재까지의 모든 데이터를 시간의 순방향으로 조회하고 출력
: 2015년 5월 12일 15시를 기준으로 10분간의 데이터를 시간의 순방향으로 조회하고 출력
AFTER는 “시간의 순방향” 즉, 과거로부터 현재 방향으로 데이터를 검색하고 출력
Past Now2015-05-12 15:10:002015-05-12 15:00:00
Scan direction
10 minute data Time gap
SELECT * FROM t1 DURATION 10 minute AFTER TO_DATE(‘2015-05-12 15:00:00’, ’YYYY-MM-DD HH24:MI:SS’);
Scan direction
SELECT * FROM t1 DURATION ALL AFTER TO_DATE(‘2015-05-12 15:00:00’, ‘YYYY-MM-DD HH24:MI:SS’);
10 minute data
Past Now2015-05-12 15:00:00
DURATION FROM/TO
7
: 2015년 5월 12일 부터 2015년 5월 10일까지 2일간의 데이터를 시간의 역방향으로 조회하고 출력
: 2015년 5월 10일 부터 2015년 5월 12일까지 2일간의 데이터를 시간의 순방향으로 조회하고 출력
FROM/TO는 두 개의 특정 절대 시간을 기준으로 데이터를 검색하고 출력
두 개의 절대 시간의 크기에 따라 데이터의 스캔 방향이 달라짐
SELECT * FROM t1 DURATION FROM TO_DATE(‘2015-05-12’, ‘YYYY-MM-DD’) TO TO_DATE(‘2015-05-10’, ‘YYYY-MM-DD’);
SELECT * FROM t1 DURATION FROM TO_DATE(‘2015-05-10’, ‘YYYY-MM-DD’) TO TO_DATE(‘2015-05-12’, ‘YYYY-MM-DD’);
Past Now
Scan direction
Past Now2015-05-12 00:00:002015-05-10 00:00:00
Scan direction
2015-05-12 00:00:002015-05-10 00:00:00
2 day data Time gap
2 day data Time gap
www.infiniflux.com
info@infiniflux.com
InfiniFlux
The World's Fastest
Time Series DBMS
for IoT and Big Data

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

InfiniFlux DURATION

  • 2. Table of Contents DURATION Concept DURATION Basic DURATION BEFORE DURATION FROM/TO DURATION AFTER 1 2 3 4 5 DURATION Demo6
  • 3. DURATION Concept 3 • 현재부터 10분 동안의 과거 데이터를 조회하는 SQL QUERY의 단순성 비교 DURATION은 SELECT 구문에서 시간 구간을 쉽게 지정할 수 있는 키워드 물리적인 데이터의 접근 범위를 좁혀서 SELECT 수행 성능에 매우 큰 영향을 미침 사용자 생성 시간 칼럼이 아닌 자동 생성되는 내부 칼럼인 _arrival_time 기준 데이터의 실시간 저장DURATION Time_Expression [ BEFORE|AFTER Time_Expression | TO_DATE(TIME)]; Time_Expression : all | year | month | day | hour | minute | second RDBMS SELECT * FROM t1 WHERE start_time > TO_DATE(‘2015-08- 01 20:50:00’, ‘YYYY-MM-DD HH24:MI:SS’); InfiniFlux SELECT * FROM t1 DURATION 10 minute;
  • 4. DURATION Basic 4 : 현재부터 과거로 10분간 시간의 역방향으로 데이터를 조회하고 시간의 역순으로 출력함. 현재 시점을 기준으로 과거로 지정된 시간 범위만큼 시간의 역순으로 데이터를 검색 SELECT * FROM t1 DURATION 10 minute; Past 10 minute data Scan direction Now(Now – 10 minutes)
  • 5. DURATION BEFORE 5 : 1시간 전 기준으로 10분간의 과거 데이터를 조회하고 시간의 역순으로 출력 : 2015년 5월 12일 15시 기준으로 10분간의 과거 데이터를 조회하고 시간의 역순으로 출력 BEFORE는 “시간의 역방향” 즉, 현재부터 과거 방향으로 데이터를 검색하고 출력 상대적 또는 절대적 시작 시점을 지정하는데 사용 Past Now(now – 1 hour)(now – 1 hour – 10 minute) Scan direction 10 minute data 1 hour SELECT * FROM t1 DURATION 10 minute BEFORE 1 hour; Past Now2015-05-12 15:00:002015-05-12 14:50:00 Scan direction SELECT * FROM t1 DURATION 10 minute BEFORE TO_DATE(‘2015-05-12 15:00:00’, ‘YYYY-MM-DD HH24:MI:SS’); 10 minute data Time gap
  • 6. DURATION AFTER 6 입력된 모든 데이터를 과거부터 현재순으로 출력하고자 하는 경우 SELECT * FROM t1 DURATION ALL AFTER TO_DATE(‘1970-01-01 09:00:00’, ‘YYYY-MM-DD HH24:MI:SS’); : 2015년 5월 12일 15시를 기준으로 현재까지의 모든 데이터를 시간의 순방향으로 조회하고 출력 : 2015년 5월 12일 15시를 기준으로 10분간의 데이터를 시간의 순방향으로 조회하고 출력 AFTER는 “시간의 순방향” 즉, 과거로부터 현재 방향으로 데이터를 검색하고 출력 Past Now2015-05-12 15:10:002015-05-12 15:00:00 Scan direction 10 minute data Time gap SELECT * FROM t1 DURATION 10 minute AFTER TO_DATE(‘2015-05-12 15:00:00’, ’YYYY-MM-DD HH24:MI:SS’); Scan direction SELECT * FROM t1 DURATION ALL AFTER TO_DATE(‘2015-05-12 15:00:00’, ‘YYYY-MM-DD HH24:MI:SS’); 10 minute data Past Now2015-05-12 15:00:00
  • 7. DURATION FROM/TO 7 : 2015년 5월 12일 부터 2015년 5월 10일까지 2일간의 데이터를 시간의 역방향으로 조회하고 출력 : 2015년 5월 10일 부터 2015년 5월 12일까지 2일간의 데이터를 시간의 순방향으로 조회하고 출력 FROM/TO는 두 개의 특정 절대 시간을 기준으로 데이터를 검색하고 출력 두 개의 절대 시간의 크기에 따라 데이터의 스캔 방향이 달라짐 SELECT * FROM t1 DURATION FROM TO_DATE(‘2015-05-12’, ‘YYYY-MM-DD’) TO TO_DATE(‘2015-05-10’, ‘YYYY-MM-DD’); SELECT * FROM t1 DURATION FROM TO_DATE(‘2015-05-10’, ‘YYYY-MM-DD’) TO TO_DATE(‘2015-05-12’, ‘YYYY-MM-DD’); Past Now Scan direction Past Now2015-05-12 00:00:002015-05-10 00:00:00 Scan direction 2015-05-12 00:00:002015-05-10 00:00:00 2 day data Time gap 2 day data Time gap