Difference between revisions of "EXPLAIN"

From Recital Documentation Wiki
Jump to: navigation, search
Line 14: Line 14:
  
 
==See Also==
 
==See Also==
[[SQL SELECT|SELECT]]
+
[[SQL SELECT|SELECT]], [[SQLCNT]]
  
  
 
==Description==
 
==Description==
 
+
Display information about the optimization and result count of an SQL SELECT statement
  
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
EXPLAIN SELECT * FROM example
+
> EXPLAIN SELECT * FROM example
 
sqlcnt=100
 
sqlcnt=100
EXPLAIN SELECT * FROM example WHERE start_date < date()
+
> EXPLAIN SELECT * FROM example WHERE start_date < date()
 
Could not optimize WHERE condition
 
Could not optimize WHERE condition
 
sqlcnt=100
 
sqlcnt=100
EXPLAIN SELECT * FROM example WHERE account_no = '000'
+
> EXPLAIN SELECT * FROM example WHERE account_no = '000'
 
Optimized using index tag 'ACCOUNT_NO'
 
Optimized using index tag 'ACCOUNT_NO'
 
sqlcnt=99
 
sqlcnt=99

Revision as of 15:24, 12 October 2009

Template:YLM to do

Class

Performance and Optimization


Purpose

Syntax

See Also

SELECT, SQLCNT


Description

Display information about the optimization and result count of an SQL SELECT statement


Example

> EXPLAIN SELECT * FROM example
sqlcnt=100
> EXPLAIN SELECT * FROM example WHERE start_date < date()
Could not optimize WHERE condition
sqlcnt=100
> EXPLAIN SELECT * FROM example WHERE account_no = '000'
Optimized using index tag 'ACCOUNT_NO'
sqlcnt=99

Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer