118 reputation
18
bio website
location
age 18
visits member for 1 year, 7 months
seen Apr 10 at 0:57

Senior High School student collecting experiences with Web Application Development, DBA and Data Modelling. Also actively working with Proxying, Load Balancing, and especially .


Oct
12
awarded  Citizen Patrol
Oct
4
awarded  Notable Question
May
13
awarded  Informed
Apr
14
awarded  Supporter
Apr
13
comment How can I improve this nested MySQL query to avoid redundant WHERE statement?
@user2276596 When you can run slow queries in your environment without harming production, you might want to have MySQL explain your query. Do SET SQL_BIG_SELECTS=1; EXPLAIN <query>. The first statement will allow you to do big joins, the latter one will give you an insight into which rows the engine actually accesses.
Apr
13
comment How can I improve this nested MySQL query to avoid redundant WHERE statement?
@user2276596 This might be happeing because your tables are very large. How much rows do you have in them? Your server could also be misconfigured - use SELECT @@MAX_JOIN_SIZE; to determine the maximum join size.You might then want to have an index on the mailing_id columns of your tables.
Apr
13
answered How can I improve this nested MySQL query to avoid redundant WHERE statement?
Mar
15
awarded  Popular Question
Sep
27
awarded  Custodian
Sep
27
reviewed Approve suggested edit on MySQL: Optimize UNION with “ORDER BY” in inner queries
Sep
24
awarded  Scholar
Sep
24
accepted MySQL: Optimize UNION with “ORDER BY” in inner queries
Sep
24
comment MySQL: Optimize UNION with “ORDER BY” in inner queries
Your modification turned out to bring desired results. Thanks! Just as a side note: by now I am not sure which index will be better. I could even use both. I'll have to check how the number of users and the log entries / user will scale.
Sep
24
comment MySQL: Optimize UNION with “ORDER BY” in inner queries
@ypercube Both tables have as much rows as the queries run through respectively: 1717 and 23.
Sep
24
awarded  Student
Sep
24
revised MySQL: Optimize UNION with “ORDER BY” in inner queries
corrected MD, added table structure
Sep
24
comment MySQL: Optimize UNION with “ORDER BY” in inner queries
@ypercube I posted them above.
Sep
24
revised MySQL: Optimize UNION with “ORDER BY” in inner queries
added execution plans for whole query and first subquery
Sep
24
comment MySQL: Optimize UNION with “ORDER BY” in inner queries
@ypercube EXPLAIN shows the same statistics.
Sep
24
revised MySQL: Optimize UNION with “ORDER BY” in inner queries
porting clarification from comments