Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url @~ 'http://' query does not ouput any debug message. #7

Closed
hiroyuki-sato opened this issue Dec 16, 2015 · 1 comment
Closed

url @~ 'http://' query does not ouput any debug message. #7

hiroyuki-sato opened this issue Dec 16, 2015 · 1 comment

Comments

@hiroyuki-sato
Copy link

problem.

When I query url @~ 'http://'
It does not ouput any debug message.

environment.

  • OS: CentOS7
  • pgroonga: 1.0.0
  • postgresql 9.4.5

table create

create table urls(id serial,url text);
\copy urls(url) from '/path/to/url_list'
create index ix_url_urls on urls using pgroonga(url) with(tokenizer='TokenRegexp');

like query

output debug message(OK)

set pgroonga.log_level = 'debug';
SET enable_seqscan = off;

select * from urls where url like 'http://%';
2015-12-16 17:32:03.388254|n| grn_init: <5.1.0>
2015-12-16 17:32:03.388394|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
2015-12-16 17:32:03.388406|i| Some processings with vm.overcommit_memory != 1 may break DB under low memory condition.
2015-12-16 17:32:03.388411|i| To set vm.overcommit_memory to 1
2015-12-16 17:32:03.388415|i| add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and restart your system or
2015-12-16 17:32:03.388419|i| run 'sudo /sbin/sysctl vm.overcommit_memory=1' command.
2015-12-16 17:32:03.408179|i| [object][search][index][key][exact] <Lexicon76021_0.index>
2015-12-16 17:32:03.408210|i| grn_ii_sel > (http://)
2015-12-16 17:32:03.408315|i| n=4 (http://)
2015-12-16 17:32:03.408626|i| exact: 66
2015-12-16 17:32:03.408643|i| hits=66
2015-12-16 17:32:03.417420|n| grn_fin (0)

@~ query

output debug message(NG)

set pgroonga.log_level = 'debug';
SET enable_seqscan = off;

select * from urls where url @~ 'http://';
2015-12-16 17:32:17.338293|n| grn_init: <5.1.0>
2015-12-16 17:32:17.338348|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
2015-12-16 17:32:17.338352|i| Some processings with vm.overcommit_memory != 1 may break DB under low memory condition.
2015-12-16 17:32:17.338354|i| To set vm.overcommit_memory to 1
2015-12-16 17:32:17.338356|i| add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and restart your system or
2015-12-16 17:32:17.338365|i| run 'sudo /sbin/sysctl vm.overcommit_memory=1' command.
2015-12-16 17:32:17.352145|n| grn_fin (0)
@kou
Copy link
Member

kou commented Dec 17, 2015

If you want to use @~ operator with index, use pgroonga.text_regexp_ops operator class instead of with(tokenizer='TokenRegexp').

See also https://github.com/pgroonga/pgroonga/blob/master/sql/regexp/text/regexp/partial/indexscan.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants