NYCPHP Meetup

NYPHP.org

[nycphp-talk] Not-so-subtle attack on PHP

Mitch Pirtle mitch.pirtle at gmail.com
Fri Sep 28 15:04:12 EDT 2007


On 9/28/07, John Campbell <jcampbell1 at gmail.com> wrote:
> That makes sense to me, I have never considered using eleventy
> thousand views.  Is managing all of those views a problem?  Do you
> create the views on the fly, or are they "fixed" when you create the
> new user account?  How do you alter the views?

If you're using MySQL, then you bypass views and give as much RAM as
you can to the query cache ;-)

Alternately, you could use something like memcache and store the
fetched values as arrays (based on userid) and then set your
application to update the key in the cache whenever that userid is
updated (from the relationship perspective).

With that approach, you offload the work to memcache which is purely
memory resident, meaning very very low load on the server to provide
that information. Also, you can set the value of the userid's for one
userid as an array, making it even easier to answer the question: So
who am I friends with, and can see their personal profiles?

-- Mitch



More information about the talk mailing list