Re: Which is a better design?

2007-05-10 Thread David T. Ashley
On 5/9/07, James Tu [EMAIL PROTECTED] wrote: The database server and the web server are on separate machines. Table A contains a record for each user. Let's say Table B contains 'relationship' information. They can be of type 'friend' or 'family'. If a user knows another user, this

Re: Which is a better design?

2007-05-10 Thread James Tu
Thanks David! This the kind of answer that I was looking for (more about general PHP and MySQL performance) I think b/c of the way the tables are designed, I have to perform multiple queries, unfortunately. I think I'll have to do some performance testing at some point. But for now I

Re: Which is a better design?

2007-05-10 Thread David T. Ashley
On 5/10/07, James Tu [EMAIL PROTECTED] wrote: I think b/c of the way the tables are designed, I have to perform multiple queries, unfortunately. Hi James, My suggestion to you would be that if you have a situation you don't believe you can handle in one query, post all the details to the

Re: Which is a better design?

2007-05-10 Thread James Tu
David: I definitely can get the result set using one query, but what I do with the result set has me thinking about breaking it up into two queries. Here's an example with a simple table: describe collection; +--+-+--+-

Re: Which is a better design?

2007-05-10 Thread David T. Ashley
On 5/10/07, James Tu [EMAIL PROTECTED] wrote: David: I definitely can get the result set using one query, but what I do with the result set has me thinking about breaking it up into two queries. Technical Details Omitted Ah, OK, I misunderstood. You want to (get two results, each of which

Re: Which is a better design?

2007-05-10 Thread Michael Dykman
If you are dong as two seperate queries, I recommend using a transactional table type setting the read isolation mode to repeatable read and doing both your queries within a single transaction. (David, sorry about the double send) - michael On 5/10/07, David T. Ashley [EMAIL PROTECTED] wrote:

Which is a better design?

2007-05-09 Thread James Tu
The database server and the web server are on separate machines. Table A contains a record for each user. Let's say Table B contains 'relationship' information. They can be of type 'friend' or 'family'. If a user knows another user, this relationship would be kept in this table, along with

Re: Which is a better design?

2007-05-09 Thread John Meyer
James Tu wrote: The database server and the web server are on separate machines. Table A contains a record for each user. Let's say Table B contains 'relationship' information. They can be of type 'friend' or 'family'. If a user knows another user, this relationship would be kept in this