Subject | how to retrieve Stat of a executed SQL ? |
---|---|
Author | nathanelrick |
Post date | 2012-02-20T18:22:06Z |
Hello
how to retrieve the stat of a just executed SQL ?
i do like this but seam to not work :
SELECT
FIRST 1 SKIP 1 /* skip 1 because last statement is THIS statement */
MON$RECORD_IDX_READS as IDX_READS,
MON$RECORD_SEQ_READS as SEQ_READS
FROM
MON$RECORD_STATS
JOIN
MON$STATEMENTS ON MON$STATEMENTS.MON$STAT_ID=MON$RECORD_STATS.MON$STAT_ID
WHERE
MON$STATEMENTS.MON$ATTACHMENT_ID=CURRENT_CONNECTION
ORDER BY
MON$STATEMENTS.MON$TIMESTAMP DESC
how to retrieve the stat of a just executed SQL ?
i do like this but seam to not work :
SELECT
FIRST 1 SKIP 1 /* skip 1 because last statement is THIS statement */
MON$RECORD_IDX_READS as IDX_READS,
MON$RECORD_SEQ_READS as SEQ_READS
FROM
MON$RECORD_STATS
JOIN
MON$STATEMENTS ON MON$STATEMENTS.MON$STAT_ID=MON$RECORD_STATS.MON$STAT_ID
WHERE
MON$STATEMENTS.MON$ATTACHMENT_ID=CURRENT_CONNECTION
ORDER BY
MON$STATEMENTS.MON$TIMESTAMP DESC