Ever had a slow down that you cannot really explain, I know that I have.
What you always need is a set of baseline tests, things that ground your expectations.
Remember that we’ve provided these sorts of things with ERP analytics (at a high level)
and performance benchmark - http://myriad-it.com/solution/performance-benchmark/ (which I think is really cool).
But let’s take it down another notch, database only!
Imagine that things are slowing down and you want to find a problem. Performance problems are like a pyramid, where there is something like:
If you’re hardware is rubbish, everything will be rubbish.
If you’re database is rubbish, everything will be rubbish…
You see where I’m going.
So, I’d first run some dd commands on the hardware to check disk speeds, I’d check the location of the data disks and then the redo disks. I check the disk speed where temp is written and swap. make sure they are all pretty quick.
[root@ronin0-net1 homewood]# dd if=/dev/zero of=speedtest1.dmp oflag=direct conv=notrunc bs=1M count=11200
6527+0 records in
6527+0 records out
6844055552 bytes (6.8 GB) copied, 299.438 seconds, 22.9 MB/s
The above would indicate a VERY large problem
[root@ronin0 homewood]# dd if=/dev/zero of=speedtest1.dmp oflag=direct conv=notrunc bs=1M count=11200
11200+0 records in
11200+0 records out
11744051200 bytes (12 GB) copied, 25.8044 seconds, 455 MB/s
The above would make you smile!
Then – you’ve tested the performance of a bunch of locations - happy days. Now the database.
Once again, simple things for simple people.
create a sql script with the following contents:
set echo on
set feedback on
set timing on
spool output.txt
begin
execute immediate 'drop table testdta.f0101perf';
execute immediate 'create table testdta.f0101perf as select * from testdta.F0101 where 1 = 0';
execute immediate 'grant all on testdta.f0101perf to PUBLIC';
for a in 1..10000 loop
insert into testdta.f0101perf select * from testdta.F0101 where aban8 = 100;
commit;
end loop;
end;
/
quit;
/
And run it at the commandline:
C:\Users\shannonm>sqlplus JDE@orcl @shannon.sql
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 1 14:03:53 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> set feedback on
SQL> set timing on
SQL> spool output.txt
SQL> begin
2 execute immediate 'drop table testdta.f0101perf';
3 execute immediate 'create table testdta.f0101perf as select * from testdt
a.F0101 where 1 = 0';
4 execute immediate 'grant all on testdta.f0101perf to PUBLIC';
5 for a in 1..100000 loop
6 insert into testdta.f0101perf select * from testdta.F0101 where aban8
= 100;
7 commit;
8 end loop;
9 end;
10 /PL/SQL procedure successfully completed.
Elapsed: 00:00:31.75
SQL> quit;
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64
bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsC:\Users\shannonm>
So, now we can open our results file, which is placed in the dir we ran the script from (again, nothing fancy). output.txt. Remember Address book 100 should exist – I could make that smarter with = (select max(aban8) from crpdta.f0101), but that would be an extra table scan (index and sort) that I did not want to execute.
What does this do?
Creates a copy of F0101 and then insert’s 100,000 records into it.
SQL> begin
2 execute immediate 'drop table testdta.f0101perf';
3 execute immediate 'create table testdta.f0101perf as select * from testdta.F0101 where 1 = 0';
4 execute immediate 'grant all on testdta.f0101perf to PUBLIC';
5 for a in 1..100000 loop
6 insert into testdta.f0101perf select * from testdta.F0101 where aban8 = 100;
7 commit;
8 end loop;
9 end;
10 /PL/SQL procedure successfully completed.
Elapsed: 00:00:31.75
SQL> quit;
Remember, that this is not really testing index creation and index tablespaces, so you might want to make the test a little more realistic, but you get the picture. It’s easy to get a bunch of indexes on the table and go from there.
Then you need to work on installing performance benchmark to start getting the stats on the other parts of your ERP – oh and ERP analytics (https://shannonmoir9.wixsite.com/website/erp-analytics)
No comments:
Post a Comment