Author Topic: dBase access speed  (Read 848 times)

0 Members and 1 Guest are viewing this topic.

NickM

  • Guest
dBase access speed
on: Mon, 14. October 2002 - 11:35:13
I was curious - which is the better way to go regarding page loading speed:
Is it better to carry information (i.e. selected info from a dbase table row) from page to page via a URL?append1=info1&append2=info2 etc....
OR
Is it better to carry only the identifier in the URL from page to page (e.g. URL?appendID=ID
and then access the database (again) using the ID, to obtain the remaining information about that row, to create the page?

releasedj

  • Guest
dBase access speed
Reply #1 on: Mon, 14. October 2002 - 13:34:01
It's quicker to pass variable via a URL string than accessing a database, for the simple reason that you're avoiding the added overhead of connecting to the database, and running the query.
However, passing the variables via the url is difficult to maintain, for example, you might configure 5 different pages to send var1 and var2 to page1.php for processing, but what if you decide later n that you need a 3rd var, var3. Instead of just changing page1.php to handle it, you have to find every page that passes variables to it for them to change.

Therefore it's best practice to just pass the id to the script, and then query the database.. and with modern databases like MySQL, you will hardly notice the time difference.

Regards,

Kelvin