[FX.php List] portal query, etc.
Alex Gates
alex at gandrpublishing.com
Tue May 22 18:43:56 MDT 2007
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
More information about the FX.php_List
mailing list