Operating System - HP-UX
1752754 Members
4986 Online
108789 Solutions
New Discussion юеВ

Re: script to fill up the table

 
SOLVED
Go to solution
Deanna Tran
Frequent Advisor

Re: script to fill up the table

hi jeanine,
I am able to create the procedure, but
how can i monitor what it is doing ? is there a way i monitor it...

Jeanine Kone
Trusted Contributor
Solution

Re: script to fill up the table

The simple way to check on it would be to open a second sql*plus session and do a "select count(*) from employee;". This will show you how many rows are in the table. You can do this over and over and watch the table growing.

Deanna Tran
Frequent Advisor

Re: script to fill up the table

hi,
how long would it takes the table to grow, when i do select count(*) from employee;
it gives me a value that is differ when
i do select max(empid) from employee...
in addition, when i run that script, it comes
back as "procedure created"
> @/u02/dtloader2.sql

Procedure created.

SQL>
Jeanine Kone
Trusted Contributor

Re: script to fill up the table

OK - The script creates a procedure that will insert data. You need to actually execute the procedure after it is created. From sql*plus, you type "execute tester1". The procedure will then execute and start inserting the data.

Once you are inserting the data, it will grow very quickly. If you want the count(*) to equal the emplid (assuming the numcount value is being inserted in the emplid field)- you should delete any data that is currently in the table before executing the script (i.e. "truncate table employee;").

If you do the queries while the script is running they will not match up (because it will continue to insert data during your queries, so the results will not be consistent). But once you stop the procedure - they should match.