Preseto에서 100만 기록의 조회 생성

863 단어 Presto
Preseto(또는 다른 것)든 수백만 음반의 데이터를 먼저 출력하고 싶을 때가 있다.
예를 들어 100만건 이상의 기능을 사용할 수 있는지 혹은 사용할 수 없는지 확인하고 싶다.
이 때 다음 조회를 실행합니다.
SELECT ones.n + 10*tens.n + 100*hundreds.n + 1000*thousands.n + 10000*tensthousands.n + 100000*hundredsthousands.n
FROM (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) ones(n),
     (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) tens(n),
     (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) hundreds(n),
     (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) thousands(n),
     (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) tensthousands(n),
     (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) hundredsthousands(n)
ORDER BY 1
그래서 100만건이 생성됐다.

좋은 웹페이지 즐겨찾기