PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Stored Queries
Stored Queries
Débuté par Sarah Tanti, 19 nov. 2014 14:17 - 4 réponses
Posté le 19 novembre 2014 - 14:17
Hi all,

Do stored queries improve the speed of the query (on HFSQL)?

Thanks
Sarah
Posté le 19 novembre 2014 - 18:13
Hi,
I think. Stored queries are running on server side and back result to client.
If it is like declared then stored queries are faster and little network hungry.
Posté le 19 novembre 2014 - 18:22
Normally yes.
They use the processor. memory, disk of the server.
They only return some of the data after the selection, ordering and so on.

If your query return all or almost all the information of the file you wont see any relevant improvement.
Posté le 19 novembre 2014 - 23:09
Hi Sarah

There is a difference between a stored procedure (that contain the execution of several queries and some extra processing) and just a stored query...

In the first case, you will avoid the back and forth between client ans server and just get the end result, so you will save some transport time. So YES

In the second, if you store only ONE query and return the result, then it's basically the same:
- stored or not, the query is executed on the server
- stored or not, the result is sent to the client
so NO....


As usual, it all depends of what you are doing

What you should do to optimize your application (as it seems that your questions all go in that direction) is review the LOGIC of your application to minimize the manipulation and transfer of data that is not really useful:
- Use more specialized queries with ONLY the fields needed
- Do NOT fill your tables by default, wait for the user to enter selection criteria and return therefore a smaller dataset
- etc...

Best regards
Posté le 20 novembre 2014 - 14:41
Hi Sarah,

Looking at your posts you are trying to gain speed with HFCS on a cloud vps.
In that case the internet speed is the bottleneck.
You can probably gain some speed by using compression (set the Connection..Compression property to True)

Regards,
Piet