The other day I tweeted that MySQL unions are my new best friend. I just want to take that back. I just spent the past six hours (it's now 5 am) overhauling a MySQL query and removing one of the unions actually sped up performance. Dazah is really my first foray into the world of big data. I've found the hardest problem so far has been writing queries that will work regardless of the subset of the data size they are working against. For example, there are multiple bubbles and audience segments on Dazah, of all sizes and each favoring a different behavior type (some bubbles are more chatty than others), and I've found that every time I optimize a query for one dataset it fubars with a different one. Just a rant.
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Recommended Answers
Jump to PostRemember that
UNION
(and its cousinsINTERSECT
andEXCEPT
) essentially require each of the provided queries to be run separately and the results collated. In this example (using PostgreSQL, but the same applies in MySQL), we can see exactly what's happening.I have a small table with …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.