Timeline for Why a query takes too long in statistics thread state in AWS Aurora MySQL?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 30, 2020 at 2:39 | comment | added | Vithulan |
The primary key of that table is customer_id , item and 'effective_date`. That's what I use now but not sure how efficient that is.
|
|
Jun 29, 2020 at 18:39 | comment | added | Rick James |
@Vithulan - Yes, customer_id will always be 20. However, item is not a single value. One index can help with 2 things in the where; another index can help with a diff 2. But there is no possible index to handle all 3 columns efficiently. (Or, am I missing your point?)
|
|
Jun 29, 2020 at 18:05 | comment | added | Vithulan | Since I'm choosing the EFFECTIVE_DATE of the rows which satisfies the where clause of e.CUSTOMER_ID = '20', always the SELECT e.CUSTOMER_ID will be 20, isn't it? | |
Jun 29, 2020 at 15:58 | history | edited | Rick James | CC BY-SA 4.0 |
added 115 characters in body
|
Jun 29, 2020 at 15:52 | history | answered | Rick James | CC BY-SA 4.0 |