[FX.php List] portal query, etc.

Alex Gates alex at gandrpublishing.com
Tue May 22 20:01:28 MDT 2007


Thanks, Dan -
So, if I want to have a few different sorting options, I should 
dynamically sort the portal using a calculated field in filemaker then 
return the portal data via fx?

I imagine to do this in my LAJAX request, I'll first edit the record to 
set the sort field, then returned the portal records.
Does that sound reasonable?

---

The size of the returned result from a query pulled from a portal would 
be exactly the same size as the returned result pulled by querying the 
entire table - right? but is it the size of the returned result the main 
determinant of the speed of the query?  Or, is it the actual find 
performed (sifting through all the records) that takes the time? 
Obviously avoiding the search through 40,000 other records should save 
some time - but does it, really?

Is it reasonable to assume the query of the entire table will take 
longer and longer the more records it has to search through?  (assuming 
40,000 - 100,000 records?)

Thanks,

Alex

DC wrote:
> tip on sorting portals: use the relationship dialog box and sort via the 
> relationship. the portal sub-arrays will be sorted by whatever you chose 
> for them in the relationship.
> 
> you are right to try to cull data output to keep things snappy. anything 
> you can do to keep FX.php from having to parse a bunch of FMP output XML 
> gunk that you'll never use is a step in the right direction.
> 
> while you are at it, take all extra fields out of your layouts too.
> 
> dan
> 
> On May 22, 2007, at 8:43 PM, Alex Gates wrote:
> 
>> Hi everyone-
>>
>> As I've mentioned before, I'm building a system that allows customers to
>> collaborate on a cookbook online.  I'm moving very near launch, but I've
>> realized I may have overlooked something rather important.
>>
>> Basically, a submitted recipe goes in the "recipes table" - and when 
>> someone
>> accesses the "view recipe" page, it queries the recipe table using their
>> account number and (sometimes) their category name.
>> I realized today that this will get slower and slower as more and more
>> recipes enter the "recipe table."
>>
>> Correct me if I'm wrong, but one would definitely notice a performance 
>> hit
>> by querying a table of 50,000 recipes and pulling back 500 records, 
>> right?
>> It can't possibly be efficient - and I'm afraid when the table gets that
>> large, my LAJAX queries will take way too long.
>>
>> So -
>> I've created a portal from my "customer data" table that displays all the
>> recipes from the recipes table for a particular account number.  I 
>> figured
>> instead of having to query the entire database, it would be substantially
>> faster to query the one record and bring back my portal data.
>>
>> First of all, am I right that if I leave it alone it will eventually 
>> become
>> incredibly slow?  Is the portal method a good solution?
>>
>>
>> Finally  - Since I'm only returning one record, I'm not able to add a
>> sortparam and bring my portal records back sorted by a field in my 
>> portal.
>> Is this possible to do with fx.php? - or, will I have to sort my array 
>> using
>> another method?
>>
>> This is something I wish I would have realized earlier - it is going 
>> to take
>> some time to go back and convert all my queries to the portal method 
>> (if I
>> get the kinks worked out, anyway) - so I need to know if it is worth the
>> effort.
>> Also - if anyone could throw me a tip on adding sortparam on the portal
>> records, that would be great.
>>
>> Thanks!
>>
>> Alex
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> 
> 


More information about the FX.php_List mailing list