MySQL AS (alias) conflict?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: MySQL AS (alias) conflict?

Post by Eran »

I read it.. it kind of lost focus near the end
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: MySQL AS (alias) conflict?

Post 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 :P

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.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: MySQL AS (alias) conflict?

Post 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.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: MySQL AS (alias) conflict?

Post by VladSun »

Simply said - your query should not mix the results of two indipendent queries into one result.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: MySQL AS (alias) conflict?

Post 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?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: MySQL AS (alias) conflict?

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: MySQL AS (alias) conflict?

Post 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.
Post Reply