|
Query or Direct File Access based Web application |
Started by Diego Sanchez, Apr., 22 2013 5:14 PM - 2 replies |
| |
| | | |
|
| |
Registered member 39 messages |
|
Posted on April, 22 2013 - 5:14 PM |
Hi, I have been developing a mid sized Web app that will be used by 150+ users from different places with varying internet speeds ranging from 2mbps ADSL to 4mbps Simmetric on a daily basis, all my tables are query based because my main concern is speed and my experience in other languages using filters has been terrible.
Does anyone else have had any ( good-bad )experience on using tables with direct access and filters?
TIA |
| |
| |
| | | |
|
| | |
| |
Posted on April, 22 2013 - 6:07 PM |
Hi Diego
it always depend of a lot of parameters, but consider this (very theoretical, you would need to do some testing)...
when using a table based on a file with a hfilter, ONLY the VISIBLE records are read from the file and send to the browser (Not true if preloading all records in the table, of course, but we are talking about optimization, here)
When using a query, the whole query has to (or may have to, depending on the query) be calculated, then only the visible records are loaded in the table...
So when you are accessing a DB via the network, the query solution may be faster (less traffic) or slower (more data access)
However, on a web server, the DB is often on the same machine as the web server, so there is no netxwork traffic for the data access. In this case, you end up with more disk access in the query solution, and everything else is basically the same, so the hfilter/direct file should be faster...
Furthermore, the number of record to be displayed is also important... if the query is returning only a few records (ie only a few pages of data, as displayed in the table), the difference in time will be negligible. On the contrary, if the query contains thousands of record, using a a direct file table should not only be faster for your user, but also reduce the data access load and add speed to your other simultaneous users.
Now, on a web site, optimization has very often nothing to do with data access, and much more in page weight, as the transfer time between server and browser is very often much bigger than the data access time
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
More information on http://www.fabriceharari.com
On 4/22/2013 10:18 AM, Diego Sanchez wrote:
Hi, I have been developing a mid sized Web app that will be used by 150+ users from different places with varying internet speeds ranging from 2mbps ADSL to 4mbps Simmetric on a daily basis, all my tables are query based because my main concern is speed and my experience in other languages using filters has been terrible.
Does anyone else have had any ( good-bad )experience on using tables with direct access and filters?
TIA
|
| |
| |
| | | |
|
| | |
| |
Registered member 39 messages |
|
Posted on April, 22 2013 - 7:53 PM |
Well Fabrice, Thanks so much for the clarification, your answer is an eye opener indeed.
Thanks again |
| |
| |
| | | |
|
| | | | |
| | |
|