Page 2 of 2
Re: MySQL AS (alias) conflict?
Posted: Mon May 25, 2009 2:36 am
by Eran
I read it.. it kind of lost focus near the end
Re: MySQL AS (alias) conflict?
Posted: Mon May 25, 2009 3:22 am
by VladSun
pytrin wrote:I thought .. gave the cartesian product?
Yeah, joining without a condition gives a cartesian product. Which is why I'm trying to convince JAB to use a proper join syntax with an ON condition
Vlad, any take on this?
I can say nothing more
pytrin wrote:I read it.. it kind of lost focus near the end
Yes, true again - simply exclude the last posts made by Weirdan and me;)
They are too theoretical.
Re: MySQL AS (alias) conflict?
Posted: Fri May 29, 2009 2:28 pm
by JAB Creations
I'm not sure what to reply with since I haven't come to any ground-breaking conclusions other then I'll continue to read. I admit my learning style is more of an apply and refine method. I'm open to suggestions for any reading about what MySQL syntax is what versus how to use it (such as the tutorials at tizag)...in example I know what SELECT does, what is it called? In an analogy #body is a CSS selector...reading about MySQL in such an approach is something I'm interested in as it'll help me acknowledge it's construct, or at least that is what I'm thinking.
Re: MySQL AS (alias) conflict?
Posted: Fri May 29, 2009 3:19 pm
by VladSun
Simply said - your query should not mix the results of two indipendent queries into one result.
Re: MySQL AS (alias) conflict?
Posted: Fri May 29, 2009 3:27 pm
by JAB Creations
Is there a program that I can plug in the database information, a query, and have it run the query like a thousand times and then repeat against say two other queries to see how long it takes for either the combined or the singular queries to execute?
Re: MySQL AS (alias) conflict?
Posted: Fri May 29, 2009 3:40 pm
by VladSun
You can write a stored procedure for such tests
But I think you miss the point - your "result" table should be "normalized" as much as it can be, while it provides meaningful information.
You are talking about query execution speed, but you take no account of the bandwidth and memory issues involved.
Re: MySQL AS (alias) conflict?
Posted: Fri May 29, 2009 3:55 pm
by Eran
Is there a program that I can plug in the database information, a query, and have it run the query like a thousand times and then repeat against say two other queries to see how long it takes for either the combined or the singular queries to execute?
You can do that very easily with PHP.
Also, you are worried with performance issues before you encounter performance problems - premature optimization is almost always useless. Concentrate on proper structure first.