Re: beginner question: how many queries via PHP are...

2002-02-17 Thread BD

At 08:33 PM 2/16/2002 , you wrote:
>Hello
>
>I am new to the subject. I am experimenting in mysql via PHP with a nice 
>book (PHP and MySQL
>Web development). My question is how many queries to mysql, made via PHP, 
>should considered
>ok for efficiency. I know it has much to do with the size of databases, 
>but I would like to get an
>idea. Thanks.
>
>  Nikolas

Nikolas,
 One thing you may want to implement is adding a LIMIT clause to 
your queries to prevent users from returning too many rows. Mine would be 
set to 100 and in a lot of cases, fewer than that. The queries will run 
much faster.

Brent


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: beginner question: how many queries via PHP are...

2002-02-16 Thread Craig Vincent


> I am new to the subject. I am experimenting in mysql via PHP with a nice
> book (PHP and MySQL
> Web development). My question is how many queries to mysql, made via
> PHP, should considered
> ok for efficiency. I know it has much to do with the size of databases,
> but I would like to get an
> idea. Thanks.

Unfortunately there really is no set number one could come up withit all
depends on what you need, the intended load of the server, speed of the
queries, optimizations of both MySQL and the OS, the system you're using and
a plethora of other variablesbasically remember it's not size but speed
that determines efficiency...so if it takes 2 seconds to complete 5 queries
you'd be better off doing that than a single query for the same information
that thats 5 seconds to complete =)

Sincerely,

Craig Vincent


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




beginner question: how many queries via PHP are...

2002-02-16 Thread Nikolas

Hello

I am new to the subject. I am experimenting in mysql via PHP with a nice 
book (PHP and MySQL
Web development). My question is how many queries to mysql, made via 
PHP, should considered
ok for efficiency. I know it has much to do with the size of databases, 
but I would like to get an
idea. Thanks.

  Nikolas


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php