Created
February 2, 2023 13:23
-
-
Save askdkc/80336e26371ac4650130a8007881661a 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
CREATE TABLE names ( | |
name varchar(255) | |
); | |
create extension pgroonga; | |
create index pgroonga_name_index on names using pgroonga (name); | |
insert into names values ('山田さん'); | |
insert into names values ('横山さん'); | |
insert into names values ('斉藤さん'); | |
explain analyze verbose select * from names where name::TEXT like '%さん%'; | |
-- | |
-- QUERY PLAN | |
---------------------------------------------------------------------------------------------------------------------------- | |
-- Seq Scan on public.names (cost=10000000000.00..10000000001.04 rows=1 width=516) (actual time=0.031..0.036 rows=3 loops=1) | |
-- Output: name | |
-- Filter: ((names.name)::text ~~ '%さん%'::text) | |
-- Planning Time: 0.173 ms | |
-- Execution Time: 0.070 ms | |
-- (5 rows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kouさん
ありがとうございます〜 💝