-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve tags ordering #273
Comments
duker33
added
1 hour
typical issue size. It's one pdd hour. Performer should spend about one astronomical hour for this i
2
performer can implement issue at his closest convenient time
take it
any teammate can take this issue and start working with it
labels
Feb 20, 2019
ArtemijRodionov
removed
the
take it
any teammate can take this issue and start working with it
label
Feb 20, 2019
We can make a plain query to postgres, that will order by chars and than by floats: select * from shopelectro_tag
order by
substring(name, '[a-zA-Zа-яА-Я]+'),
substring(name, '[0-9]+\.?[0-9]*')::float;
Also to avoid performance gaps we can create an index for the expression: se_prod=# explain ANALYSE select * from shopelectro_tag order by name;
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using tag_ordering on shopelectro_tag (cost=0.42..8240.48 rows=100009 width=53) (actual time=0.024..821.284 rows=100009 loops=1)
Planning time: 0.174 ms
Execution time: 1504.217 ms
(3 rows) se_prod=# explain ANALYSE select * from shopelectro_tag order by substring(name, '[a-zA-Zа-яА-Я]+'), substring(name, '[0-9]+\.?[0-9]*')::float;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using tag_ordering_2 on shopelectro_tag (cost=0.42..9004.64 rows=100009 width=53) (actual time=0.039..1205.072 rows=100009 loops=1)
Planning time: 0.378 ms
Execution time: 1915.029 ms
(3 rows) The difference between |
I am going to implement the query in this issue |
ArtemijRodionov
added a commit
that referenced
this issue
Feb 21, 2019
* Create substring expression Create order_by_alphanumeric Test order_by_alphanumeric * Fix todo * Fix typo * Review fixes * Create additional todo to integrate order_by_alphanumeric * Fix typo
This was referenced Feb 21, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TagQuerySet.filter_by_products
and_.exclude_by_products
from SE. We already done it at stb in catalog.py:20: Adapt views to Options stroyprombeton#419Screen taken from this link: https://www.shopelectro.ru/catalog/categories/akkumuliatory-270/
The text was updated successfully, but these errors were encountered: