Subject Re: [Firebird-Java] How can I tell what row has been inserted into Firebird db via JSP
Author Thomas Steinmaurer
> From: Mark Rotteveel<mark@...>
>> If you use executeUpdate() or getUpdateCount() on Statement it returns
>> the number of affected rows (it actually returns either the number of
>> inserts, deletes or updates; whichever is the highest number).
>>
>> You can also access this information by casting the statement to
>> org.firebirdsql.jdbc.FirebirdStatement and using getDeletedRowsCount(),
>> getInsertedRowsCount() or getUpdatedRowsCount()
>> Mark Rotteveel
> ------- End of Original Message -------
>
> Hmmm, not really what I meant. Those still just return "global counts". What I
> was meaning was something like this:
>
> Executing statement...
> Statement executed (elapsed time: 0.625s).
> 5298 fetches, 38 marks, 121 reads, 1 writes.
> 4 inserts, 5 updates, 0 deletes, 623 index, 0 seq.
> Delta memory: 2054240 bytes.
> BT_LOGS: 1 inserts.
> BT_FLAG_REF: 2 updates.
> BT_LOANS: 1 updates.
> BT_FLAG_LOANS: 2 updates.
> BT_EVENT_REF_HEAD_MOD: 1 inserts.
> LO_LOANS: 1 inserts.
> LO_EVENT_REF_HEAD_MOD: 1 inserts.
> 1 row affected directly.
> Total execution time: 1.844s

You get a bit something like that via the Trace API and the detailed
statistics output, when the "time_threshold" trace configuration
parameter is set to 0.

The following example is for a select statement on a single table, but I
think you get the idea, as the detailed statistics (natural, index,
update, insert ..) can hold a list of tables and not only one.

2012-03-09T23:18:22.7260 (1680:0100E01C) EXECUTE_STATEMENT_FINISH
isdap_olap.fdb (ATT_1584, ISDAP:NONE, NONE, TCPv4:127.0.0.1)
C:\databases\firebird25\fsql.exe:1472
(TRA_7227, CONCURRENCY | WAIT | READ_WRITE)

Statement 613:
-------------------------------------------------------------------------------
select count(*) from dim_time
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (DIM_TIME NATURAL)
1 records fetched
77 ms, 910 read(s), 174621 fetch(es)

Table Natural Index Update Insert
Delete Backout Purge Expunge
***************************************************************************************************************
DIM_TIME 86400



Regards,
Thomas


> I'm talking about that section in the middle, with the counts per-table. I really
> ought to just poke at their source. Thanks though!
>
> -Philip
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>