NYCPHP Meetup

NYPHP.org

[nycphp-talk] more queries, or bigger in-memory data structure ?

David Mintz dmintz at panix.com
Thu Sep 18 21:29:46 EDT 2003


On Thu, 18 Sep 2003, Analysis & Solutions wrote:

> > I believe I do follow you and I don't think it would do for me (or, it
> > would work, and I do not understand you (-:).
>
> Seems to be the latter. :)
>
<snip />
> So, psuedo code...
<snip />


I think I follow you now. Seems like a solution, thank you. I suppose one
could haggle that you're pulling redundant data that you aren't gonna use,
if you see my point. Perhaps I'll  show you how I'm doing it, once I
get it presentable, see what you think.

Chris said:
<<Without having a good idea about the particular tradeoffs in someone's
situation, it is hard to suggest one way over the other. Personally, I try
to organize my data so well that my queries are as simple as possible (I'm
not joining multiple tables all the time), useful as possible (I can get
exactly the data I need from a simple query), and use up as little memory
as possible (the number of records returned are no more than I need).
Given this, I almost always limit my interactions with the database and do
everything in PHP.>>

I think I have done this as best I can in this particular scenario. The
only way to do fewer joins would be to de-normalize the hell out of my db,
and I would surely end up paying dearly for that elsewhere.

Anyway I'm grateful for the discussion. This list rocks.


---
David Mintz
http://davidmintz.org/
Email: See http://dmintzweb.com/whitelist.php first!

"Y dále p'abajo"

	Tito Rojas



More information about the talk mailing list