Last active
December 29, 2019 22:36
-
-
Save jfischoff/21231e95451789d654419f03ebd2c2da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019-12-29 21:13:35 GMT [42602]: LOG: duration: 2.476 ms plan: | |
Query Text: INSERT INTO users (email, password, name) VALUES ('[email protected]', 'password', 'name1') RETURNING id | |
Insert on public.users (cost=0.00..0.02 rows=1 width=382) (actual time=2.471..2.472 rows=1 loops=1) | |
Output: id | |
Buffers: shared hit=9 read=11 dirtied=9 | |
I/O Timings: read=1.879 | |
-> Result (cost=0.00..0.02 rows=1 width=382) (actual time=1.100..1.100 rows=1 loops=1) | |
Output: nextval('users_id_seq'::regclass), clock_timestamp(), clock_timestamp(), '[email protected]'::character varying(140), '\x70617373776f7264'::bytea, 'name1'::text | |
Buffers: shared hit=9 read=4 dirtied=2 | |
I/O Timings: read=1.028 | |
2019-12-29 21:13:35 GMT [42602]: LOG: duration: 17.477 ms statement: INSERT INTO users (email, password, name) VALUES ('[email protected]', 'password', 'name1') RETURNING id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019-12-29 22:34:16 GMT [45399]: LOG: duration: 1.995 ms plan: | |
Query Text: SELECT * FROM pg_prewarm('public.users'); SELECT * FROM pg_prewarm('public.users_id_seq'); | |
Function Scan on public.pg_prewarm (cost=0.00..0.01 rows=1 width=8) (actual time=1.984..1.985 rows=1 loops=1) | |
Output: pg_prewarm | |
Function Call: pg_prewarm('users'::regclass, 'buffer'::text, 'main'::text, NULL::bigint, NULL::bigint) | |
Buffers: shared hit=33 read=10 dirtied=5 | |
I/O Timings: read=1.819 | |
2019-12-29 22:34:16 GMT [45399]: LOG: duration: 0.334 ms plan: | |
Query Text: SELECT * FROM pg_prewarm('public.users'); SELECT * FROM pg_prewarm('public.users_id_seq'); | |
Function Scan on public.pg_prewarm (cost=0.00..0.01 rows=1 width=8) (actual time=0.331..0.331 rows=1 loops=1) | |
Output: pg_prewarm | |
Function Call: pg_prewarm('users_id_seq'::regclass, 'buffer'::text, 'main'::text, NULL::bigint, NULL::bigint) | |
Buffers: shared hit=9 read=1 | |
I/O Timings: read=0.268 | |
2019-12-29 22:34:16 GMT [45399]: LOG: duration: 8.410 ms statement: SELECT * FROM pg_prewarm('public.users'); SELECT * FROM pg_prewarm('public.users_id_seq'); | |
2019-12-29 22:34:16 GMT [45399]: LOG: duration: 0.045 ms statement: BEGIN ISOLATION LEVEL SERIALIZABLE READ WRITE | |
2019-12-29 22:34:16 GMT [45399]: LOG: duration: 0.012 ms statement: SAVEPOINT temp1 | |
2019-12-29 22:34:16 GMT [45399]: LOG: duration: 0.007 ms statement: SAVEPOINT temp2 | |
2019-12-29 22:34:16 GMT [45399]: LOG: duration: 1.889 ms plan: | |
Query Text: INSERT INTO users (email, password, name) VALUES ('[email protected]', 'password', 'name1') RETURNING id | |
Insert on public.users (cost=0.00..0.02 rows=1 width=116) (actual time=1.887..1.887 rows=1 loops=1) | |
Output: id | |
Buffers: shared hit=1 read=10 dirtied=9 | |
I/O Timings: read=1.397 | |
-> Result (cost=0.00..0.02 rows=1 width=116) (actual time=0.639..0.639 rows=1 loops=1) | |
Output: nextval('users_id_seq'::regclass), clock_timestamp(), clock_timestamp(), '[email protected]'::text, '\x70617373776f7264'::bytea, 'name1'::text | |
Buffers: shared hit=1 read=3 dirtied=2 | |
I/O Timings: read=0.596 | |
2019-12-29 22:34:16 GMT [45399]: LOG: duration: 4.056 ms statement: INSERT INTO users (email, password, name) VALUES ('[email protected]', 'password', 'name1') RETURNING id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019-12-29 21:13:35 GMT [42602]: LOG: duration: 0.036 ms plan: | |
Query Text: INSERT INTO users (email, password, name) VALUES ('[email protected]', 'password', 'name2') RETURNING id | |
Insert on public.users (cost=0.00..0.02 rows=1 width=382) (actual time=0.034..0.035 rows=1 loops=1) | |
Output: id | |
Buffers: shared hit=8 | |
-> Result (cost=0.00..0.02 rows=1 width=382) (actual time=0.003..0.003 rows=1 loops=1) | |
Output: nextval('users_id_seq'::regclass), clock_timestamp(), clock_timestamp(), '[email protected]'::character varying(140), '\x70617373776f7264'::bytea, 'name2'::text | |
Buffers: shared hit=1 | |
2019-12-29 21:13:35 GMT [42602]: LOG: duration: 0.176 ms statement: INSERT INTO users (email, password, name) VALUES ('[email protected]', 'password', 'name2') RETURNING id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE users | |
( id SERIAL PRIMARY KEY | |
, created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT clock_timestamp() | |
, modified_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT clock_timestamp() | |
, email text NOT NULL | |
, password bytea NOT NULL | |
, name text NOT NULL | |
, UNIQUE (email) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment