Hello.




It is a hard task to answer if we don't see your queries and tables'

structure. Sometimes several small queries could be faster than a big

one. For example, often, query with subqueries or union runs slower than

few queries which use temporary tables.







"Octavian Rasnita" <[EMAIL PROTECTED]> wrote:

> Hi,

> 

> I have a big query that involves searching in more tables, and I think this

> might be slower than creating more smaller queries. What do you think, is

> this true generally?

> 

> The query searches in a big table but it also counts the number of records

> from other 2 tables based on a criteria, and usually the result is a big

> number of records, but the final result is limited using "limit 0,30".

> 

> So I am wondering...

> Could it work faster if I won't count(*) the number of records in those 2

> tables, but get the result (only 30 records), then for each separate record

> use a separate query that gets that number?

> 

> I don't know, could 31 queries work faster than a single bigger and complex

> query?

> 

> Thank you.

> 

> Teddy

> 

> 

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to