> There is anyone using php3 under a linux system?
> I use php3 as an apache module and MySQL database on a linux (Debian
> 2.1) system.
> In my database I have a table of about 30Mb big.
> I use to connect to my database in this manner:
> $query="select * from $table where field1=aValue and
> It's all right. Query is very fast.
> But if I add "order by" in the query, so it is "select * from $table
> where field1=aValue and field2=anotherValue order by field3,field4",
> the query is very very slow.
> It is not a problem of MySQL because if I execute the same query using
> the MySQL interface it is very fast.
> So why with php3 the query with "order by" is so slow?
Are you sure you are running the same query? Enable logging in mysqld,
then run the query from the web, go to the log, copy and paste it into
mysql client and see if it runs any faster.