|
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]
|