You are here: Re: MySQL is making me nuts! « PHP Programming Language « IT news, forums, messages
Re: MySQL is making me nuts!

Posted by smorrey on 10/26/05 21:01

Ok, thanks that helps quite a bit, the single user page load was cut by
25% by using phpmyadmin to create indexes on from_user and to_user,
which I assume is what you meant, since I have no clue how to create an
index any other way.

But the page load times are still spectacularly high.
It seems to me, that this should still be something handled via a
simple DB query.
I mean really it SHOULD be as simple as SELECT SUM(to_amount) WHERE
to_user = 1 - SUM(from_amount) WHERE from_user = 1

However that doesn't appear to work either :(

Steve wrote:
> > This works great, so I populated the DB with over 100,000 records and
> > now page loads take 75-80 seconds for the total balance sheet page (I
> > just loop through each user, and there are 100 users), and upwards of
> > 10 seconds on a single user query.
>
> Forget the SQL, the syntax is all over the place. Go back to the
> original queries, but create indexes on columns `from_user` and
> `to_user`.
>
> ---
> Steve

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация