Timeline for How to make this query use my multicolumn index?
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 1, 2023 at 16:53 | history | edited | Erwin Brandstetter | CC BY-SA 4.0 |
link, markup
|
Apr 13, 2017 at 12:42 | history | edited | CommunityBot |
replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/
|
|
Oct 1, 2015 at 12:21 | comment | added | Erwin Brandstetter |
@ChristianSchmitt: char(n) would be a mistake. The choice between varchar(n) and text is not as clear. text is just my personal preference to keep things simple.
|
|
Oct 1, 2015 at 12:16 | comment | added | Christian Schmitt | oh and I know that i doesn't need to use varchar(n), currently crm_customer is a really really old table (created 3 years ago). On newers I avoided varchar at all. I don't have any Data which needs a length restrictions, however some of the data got converted from mysql where you use it. before we used char(n) migrated to varchar(n) and now we've seen that we could use only text. ;) still thanks for the hint. | |
Oct 1, 2015 at 12:14 | history | edited | Erwin Brandstetter | CC BY-SA 3.0 |
link to wiki
|
Oct 1, 2015 at 12:07 | history | edited | Erwin Brandstetter | CC BY-SA 3.0 |
one more hint
|
Oct 1, 2015 at 12:06 | comment | added | Erwin Brandstetter |
@ChristianSchmitt: Yes, that index is for when there is an equality predicate on rating in your query (mostly).
|
|
Oct 1, 2015 at 12:04 | vote | accept | Christian Schmitt | ||
Oct 1, 2015 at 12:04 | vote | accept | Christian Schmitt | ||
Oct 1, 2015 at 12:04 | |||||
Oct 1, 2015 at 12:03 | comment | added | Christian Schmitt |
but that will only works if rating is set, correct? I tried and never get anything else to work, also I can't search for lower(mail) LIKE 'mymail@%' somehow strange. However I firstly need to read your links now thanks!
|
|
Oct 1, 2015 at 11:55 | history | edited | Erwin Brandstetter | CC BY-SA 3.0 |
added 39 characters in body
|
Oct 1, 2015 at 11:50 | history | answered | Erwin Brandstetter | CC BY-SA 3.0 |