Neoview SQL Reference Manual (R2.3)

Get Data All:
"EXPLAIN OUTPUT(FORMATTED)"
" "
"LC RC OP OPERATOR OPT DESCRIPTION CARD "
"--- --- --- -------------------- -------- -------------------- ---------"
" "
"3 . 4 root 1.76E+003"
"2 . 3 split_top 1:64(hash2) 1.76E+003"
"1 . 2 partition_access 1.76E+003"
". . 1 file_scan fs fr EMPLOYEE 1.76E+003"
8 rows fetched from 1 column.
Example of EXPLAIN Statement Using JDBC
import common.*;
import java.sql.*;
public class j1
{
public static void main(String args[])
{
Connection connection;
Statement stmt;
PreparedStatement pStmt;
ResultSet rs;
DatabaseMetaData dbMeta;
int rowNo;
String table = "cat_expR2.sch_expR2.nation";
String sqlText = "explain select * from " + table;
try
{
connection = expUtils.getPropertiesConnection();
for (int i = 0; i < 10; i++)
{
switch (i)
{
case 0:
System.out.println("");
stmt = connection.createStatement();
rs = stmt.executeQuery(sqlText);
System.out.println(sqlText);
break;
default:
rs = null;
continue;
}
ResultSetMetaData rsMD = rs.getMetaData();
System.out.println("");
for (int j = 1; j <= rsMD.getColumnCount(); j++)
{
System.out.println(rsMD.getColumnName(j));
}
rowNo = 0;
while (rs.next())
{
rowNo++;
for (int j=1; j <= rsMD.getColumnCount(); j++)
{
System.out.println(rs.getObject(j));
}
}
System.out.println("");
System.out.println("--- SQL operation complete");
rs.close();
}
connection.close();
}
EXPLAIN Statement 115