FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Speeding up of php page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Speeding up of php page [message #178926 is a reply to message #178925] Sun, 26 August 2012 10:37 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
houghi wrote:
> I have a page that takes 7.4 seconds to load. I believe this is due to
> the bad way it asks for the MySQL data.
>
> I have moved the MySQL database from HD to SSD and even to memory, but
> there was no significant increase in speed. This makes me believe it is
> the way I (badly) wrote the queries and/or the building of the page.

> $sql = "SELECT qconst FROM quotes WHERE tconst LIKE \"$tconst\" GROUP BY qconst";

Add an index on tconst

should give you about 100:1 speed up


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Database Abstraction Layer
Next Topic: Using SQLite3 on 1&1 or elsewhere that does not have it installed
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 07:07:38 GMT 2024

Total time taken to generate the page: 0.03877 seconds