SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE t(id int PRIMARY KEY, value text); INSERT INTO t(id, value) SELECT generate_series, (generate_series % 100)::text FROM generate_series(1, 10000); CREATE INDEX ndv ON t(value, id); EXPLAIN (analyze, verbose, buffers, timing) SELECT min(id) FROM t; EXPLAIN (analyze, verbose, buffers, timing) SELECT min(id) FROM t WHERE value='48'; EXPLAIN (analyze, verbose, buffers, timing) SELECT max(id) FROM t WHERE value='6';

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear