UNION

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

Moderator: General Moderators

Post Reply
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

UNION

Post by sebs »

If I make a union on 2 tables works slower then making a single select on those 2 tables united?
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

depends on the query
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

Post by sebs »

The 2 querys I am making are almoust the same.The querys are big.Depends how?If you know?Thanks!
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

time them. If you're not sure how to use MySQL (I presume you're using that) from the commandline, use phpMyAdmin to run the different queries and see how long it took.
Post Reply