Rene
|
| Posted: 06/28/2002, 10:33 AM |
|
If I'm designing an input form based on SQL Server data and I want several fields with drop-down values, which would be better performance-wise...pull the data from separate SQL tables or create Lists of Values in CCS? The drop downs would contain anywhere from 2-15 choices. I know from prior experience that drop-downs using SQL reference tables with several hundred records really slowed the page down but I don't know if there's a performance difference for small lists.
|
|
|
 |
Chris K.
|
| Posted: 06/28/2002, 12:42 PM |
|
For small data sets it nearly the same for SQL and LOVs. Both require to create DataSource object for combo box. Only reason you could need SQL data source is changing list contents using some administrative page, if the list is constant LOV would be better.
|
|
|
 |
Brent
|
| Posted: 06/28/2002, 2:34 PM |
|
It depends on how many concurrent users you expect to have. When things start to
slow down the first thing you're going to do is to eliminate unnecessary database
access. And that may mean turning those SQL lookups into list of values.
Of course maintaining a list of values is harder than updating a database record.
That's why a few months back I wrote a function that would generate an include
file to define the list of values from a database table. So when the admin
user modifies the lookups table, it generates the PHP code for the include file
that has the new list of values. From that point on the database is never accessed
to get the lookup values. The include file is loaded that has the lookup values
instead which is much faster than doing a database connection and executing an
SQL statement to populate a listbox. Doing it my way the listboxes are pre-populated
with the include file.
|
|
|
 |
RAM
|
| Posted: 10/10/2002, 4:20 AM |
|
Brent
could you share you code on how to do this
Thanks
Ron
|
|
|
 |