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

Add user search methods by email/name fragment #5051

Merged
merged 1 commit into from
May 15, 2017
Merged

Conversation

akorneta
Copy link
Contributor

What does this PR do?

Adds user search methods by email/name part.
Adds pattern index on email for postgresql.

What issues does this PR fix or reference?

is needed for: issue

Changelog

add user search methods by email/name fragment

Release Notes

n/a

Docs PR

n/a

@akorneta akorneta added the kind/enhancement A feature request - must adhere to the feature request template. label May 11, 2017
@skabashnyuk
Copy link
Contributor

skabashnyuk commented May 11, 2017

@akorneta can you provide pgsql explain for each query?
Can you explain how these methods will be used? how often?

@akorneta
Copy link
Contributor Author

akorneta commented May 12, 2017

@skabashnyuk this methods are needed for onprem admins and in one use case for saas admin so I think it is not the most frequent query.

explanations:

by email part

Seq Scan on usr u  (cost=0.00..10.53 rows=1 width=2088) (actual time=0.011..0.011 rows=0 loops=1)
Filter: (lower((email)::text) ~~ concat('%', 'explain', '%'))
Rows Removed by Filter: 1

by email part count

Aggregate  (cost=10.53..10.54 rows=1 width=2088) (actual time=0.013..0.013 rows=1 loops=1) ->  Seq Scan on usr u  (cost=0.00..10.53 rows=1 width=2088) (actual time=0.012..0.012 rows=0 loops=1)
Filter: (lower((email)::text) ~~ concat('%', 'explain', '%'))
Rows Removed by Filter: 1

by name part

Seq Scan on usr u  (cost=0.00..10.53 rows=1 width=2088) (actual time=0.009..0.009 rows=0 oops=1)
Filter: (lower((name)::text) ~~ concat('%', 'explain', '%'))
Rows Removed by Filter: 1

by name part count

Aggregate  (cost=10.53..10.54 rows=1 width=2088) (actual time=0.021..0.022 rows=1 loops=1) ->  Seq Scan on usr u  (cost=0.00..10.53 rows=1 width=2088) (actual time=0.019..0.019 rows=0 loops=1)
Filter: (lower((name)::text) ~~ concat('%', 'explain', '%'))
Rows Removed by Filter: 1

@akorneta akorneta force-pushed the user_search branch 2 times, most recently from d4b7b41 to 6b08e87 Compare May 13, 2017 13:33
@akorneta akorneta merged commit a15f3db into master May 15, 2017
@akorneta akorneta deleted the user_search branch May 15, 2017 07:10
@codenvy-ci
Copy link

@ashumilova ashumilova added this to the 5.11.1 milestone May 29, 2017
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants