Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3785490

Browse files
added csv creation
1 parent 98393d2 commit 3785490

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

‎.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
test.csv.gz
2+
test.db
3+
duckdb
4+
.*
5+

‎create_csv.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
error_reporting(E_ALL);
4+
5+
$fp = fopen('test.csv', 'w');
6+
fputcsv($fp, ['customer_id', 'product_id']);
7+
8+
for ($i = 0; $i < 50_000_000; $i++) {
9+
fputcsv($fp, [rand(100000, 1000000), rand(1000, 10000)]);
10+
}
11+
12+
fclose($fp);

‎test.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.open test.db
2+
PRAGMA enable_profiling;
3+
CREATE TABLE test1 AS SELECT * FROM read_csv_auto('test.csv.gz');
4+
DESCRIBE test1;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /