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

SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular

SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code. You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.

Copy Format Clear
CREATE EXTENSION pg_trgm; CREATE EXTENSION unaccent; CREATE TABLE tt1 (value text, testfield int); INSERT INTo tt1 (value, testfield) (SELECT generate_series::text || ' ' || (generate_series+1)::text, generate_series % 7 FROM generate_series(1000000, 2000000)); CREATE OR REPLACE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE PARALLEL SAFE AS $function$ SELECT unaccent('public.unaccent', $1) $function$ ; CREATE INDEX qweqwe ON tt1 USING gin (f_unaccent(value) gin_trgm_ops) WHERE testfield < 3; analyze tt1; explain select * from tt1 WHERE f_unaccent(value) like '%237%' AND testfield < 3;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear