Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 462
  • Last Modified:

Count of rows being inserted per minute

Hi Gurus,

I'm trying to get the countof rows inserted in per minute while data load is happening. Please help.
Count-of-rows-per-min.sql
0
loginboy
Asked:
loginboy
1 Solution
 
slightwv (䄆 Netminder) Commented:
>>while data load is happening.

What is loading the data?
If it isn't committing then you will be unable to query the table while some other process is loading the data.

Based on the test sample you provided:  What are your expected results?

First guess is something like this should count and group by the minute:
select to_char(ins_dt,'MM/DD/YYYY HH24:MI'), count(*) from test_tab group by to_char(ins_dt,'MM/DD/YYYY HH24:MI');
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
If the table has a date field, just count the number of rows per minute (see above suggestion).

If table is not having a date field, you could write a trigger 'before insert' that is updating a counter in another table for each minute. What are you after exactly?
0
 
loginboyAuthor Commented:
Perfect. Sorry for the delayed update!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now