Difference between revisions of "SET SMARTQUERY"

From Lianjapedia
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
SET SMARTQUERY ON | OFF | (<expL>)
 
SET SMARTQUERY ON | OFF | (<expL>)
  
SET SMARTQUERY TO <expN>
+
SET SMARTQUERY TO [<expN>]
  
 
==See Also==
 
==See Also==
[[CLEAR SMARTQUERY]], [[SQL SELECT|SELECT]]
+
[[CLEAR SMARTQUERY]], [http://www.lianja.com/community/showthread.php?3507-Performance-optimization-on-network-drives-using-SMARTQUERY-caching Performance optimization on network drives using SMARTQUERY caching], [[SQL SELECT|SELECT]]
  
==Description==
+
==Description==
 
When SET SMARTQUERY ON is in effect, then data selected with SQL SELECT commands is cached.  When the same SELECT query is run again and no modifications have been made to the tables involved in the query, then the cached result set is returned without having to re-execute the query.  This improves web application query performance.  
 
When SET SMARTQUERY ON is in effect, then data selected with SQL SELECT commands is cached.  When the same SELECT query is run again and no modifications have been made to the tables involved in the query, then the cached result set is returned without having to re-execute the query.  This improves web application query performance.  
  
Line 25: Line 25:
 
[[Category:Set_Commands|SMARTQUERY]]
 
[[Category:Set_Commands|SMARTQUERY]]
 
[[Category:SQL]]
 
[[Category:SQL]]
 +
[[Category:Performance and Optimization]]
 +
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Command Extensions]]

Latest revision as of 12:28, 10 March 2017

Purpose

Enable and configure SmartQuery caching

Syntax

SET SMARTQUERY ON | OFF | (<expL>)

SET SMARTQUERY TO [<expN>]

See Also

CLEAR SMARTQUERY, Performance optimization on network drives using SMARTQUERY caching, SELECT

Description

When SET SMARTQUERY ON is in effect, then data selected with SQL SELECT commands is cached. When the same SELECT query is run again and no modifications have been made to the tables involved in the query, then the cached result set is returned without having to re-execute the query. This improves web application query performance.

The cached results are deleted automatically when their lifetime expires. This lifetime defaults to any changes being made within 1 second. The lifetime can be changed using the SET SMARTQUERY TO <expN> command, where <expN> is the lifetime in seconds.

Example

set smartquery on
set smartquery to 2