MySQL Forums
Forum List  »  Performance

2 small queries vs 1 big
Posted by: Roman Ivanov
Date: August 27, 2005 12:46PM

Will there be a significant performance difference between 1 complex query and 2 simple queries? (Assuming that such queries will be used many times.)

---

SELECT u.id, u.name, u.info, g.id, g.name, g.logo
FROM user AS u, group AS g
WHERE u.id = '12'
AND g.id = u.groupId

---

SELECT u.id, u.groupId, u.name, u.info
FROM user AS u
WHERE u.id = '12'

SELECT g.id, g.name, g.logo
FROM group AS g
WHERE g.id = '3'

---

Options: ReplyQuote


Subject
Views
Written By
Posted
2 small queries vs 1 big
2344
August 27, 2005 12:46PM
1621
August 28, 2005 02:42AM
1436
August 28, 2005 12:34PM
1654
August 28, 2005 01:58PM
1410
August 30, 2005 08:15AM
1435
August 30, 2005 08:27AM
1497
August 30, 2005 05:50PM
1482
August 31, 2005 03:20AM
1573
September 07, 2005 11:56AM
1738
September 07, 2005 01:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.