Timeline for What column/s do I need an index for my queries?
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:42 | history | edited | CommunityBot |
replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/
|
|
Jan 11, 2017 at 4:00 | history | edited | Dumb Question | CC BY-SA 3.0 |
added 242 characters in body
|
Jan 11, 2017 at 1:33 | history | edited | Rick James | CC BY-SA 3.0 |
wrap; edited tags
|
Jan 11, 2017 at 1:30 | answer | added | Rick James | timeline score: 2 | |
Jan 10, 2017 at 14:18 | comment | added | Dumb Question | #2 is the most used query in my queries. | |
Jan 10, 2017 at 14:17 | history | edited | Dumb Question | CC BY-SA 3.0 |
added 99 characters in body
|
Jan 10, 2017 at 14:13 | comment | added | Dumb Question |
Thanks for the response, mostly, the field is only one field, only #4 and #6 have multiple field : field and field2 . And what do you mean by Note, that if you index just the field(s) in your where clause you might still need to add columns for those in your select., I am not that good in english so I do not understand what you meant in your last sentence.
|
|
Jan 10, 2017 at 14:06 | comment | added | paulbarbin | Agreed with RLF, the fields that are passed to these queries would be obvious starts, but if that's a large number (or all fields) then that's not practical. I'd say, look at performance. Look at the most used queries, I'm not a MySQL dev, but in MSSql you can review system tables to tell you which queries are run the most often and which ones are the most expensive. Then you can focus on those. Note, that if you index just the field(s) in your where clause you might still need to add columns for those in your select. | |
Jan 10, 2017 at 14:00 | history | edited | Dumb Question | CC BY-SA 3.0 |
added content in body
|
Jan 10, 2017 at 13:52 | comment | added | Dumb Question | Ah okay, thanks for the response! What information do you need? I will edit my question anytime. | |
Jan 10, 2017 at 13:48 | comment | added | RLF | In general with your sample, the {field} could be indexed for better performance. Beyond that, however, your generic code does not provide much information to reach a decision. | |
Jan 10, 2017 at 13:46 | history | edited | Dumb Question | CC BY-SA 3.0 |
edited title
|
Jan 10, 2017 at 11:45 | history | asked | Dumb Question | CC BY-SA 3.0 |