[FX.php List] Portal vs 2nd query [Was: Related Records]

Derrick Fogle derrick at fogles.net
Tue Mar 21 16:29:02 MST 2006


I count a transaction as every time you call FMFind(), FMNew(), i.e.  
each time PHP has to ask FM for a record or recordset, and parse the  
resultant XML result.

In my classic example where I can only get about a transaction per  
second, I only have 2 tables: Buildings and Rooms. I was finding a  
set of Buildings (about 60), and then in a foreach() loop, I was  
finding for rooms in that building. Total number of transactions was  
61 (one for buildings, one for rooms in each building). The average  
number of room records per building is about 5-6. This 60+  
transaction FX.php scenario took about a minute to load the data.

When I switched it to using a portal to Rooms from the Building  
table, it was only a single transaction and although I was returning  
the same total amount of data, it only took about 2 seconds to load  
the data with the single transaction.

There were a couple of other instances where I was trying to do  
another query inside a foreach() loop, and the difference in time  
between that method and the portal method is how I arrived at my  
"about 1 second per transaction" limit for my hardware.

So, how many actual FMFind() queries is your page executing total?  
What hardware/software are you running? I'm curious - I'd sure like  
better performance out of my FM/FX.php setup using discreet  
transactions for child records.

On Mar 21, 2006, at 4:54 PM, Joel Shapiro wrote:

> I'm not sure how you count transactions in a scenario like this.   
> In my deployed project, I'm using nested queries 4 deep (on a  
> detail page, looking down to great-great-grandchildren) -- not  
> using portals -- and I return 55 records (showing as if 'sub- 
> summarized') in 3 to 4 seconds.


Derrick Fogle
derrick at fogles.net





More information about the FX.php_List mailing list