Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
create extension citext; create table test1 (tx citext unique); create table test2 (tx text); create unique index u_test2_tx on test2(lower(tx)); insert into test1 -- select gen_random_uuid() from generate_series(0, 1000000) union select '123e4567-e89b-12d3-a456-426655440000'; values ('hello world 1'), ('Hello world 2'), ('Hello World 3'), ('HELLO WORLD 4'); insert into test2 -- select gen_random_uuid() from generate_series(0, 1000000) union select '123e4567-e89b-12d3-a456-426655440000'; values ('hello world 1'), ('Hello world 2'), ('Hello World 3'), ('HELLO WORLD 4'); explain analyze SELECT * from test1 where tx = '123e4567-e89b-12d3-a456-426655440000'; explain analyze SELECT * from test1 where lower(tx) = lower('123e4567-e89b-12d3-a456-426655440000')

Stuck with a problem? Got Error? Ask AI support!

Copy Clear