Skip to Main Content
  • Questions
  • Assessment for platform that uses both Oracle and MongoDB

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Rajeshwaran.

Asked: February 20, 2017 - 3:04 pm UTC

Last updated: February 23, 2017 - 3:08 am UTC

Version: 12.1.0.2

Viewed 1000+ times

You Asked

Team,

Very recently I got this question, not sure how to respond. could you help us on this ?

We are going to do an assessment of a platform that uses both Oracle and MongoDB. 

Can you please list down the artifacts that are required for analyzing the performance and scalability?


So what are the "artifacts" should i consider for analyzing the performance and scalability for an Oracle database?


and Connor said...

All that matters is that you can benchmark any prospective platform - lots of free tools out there to do this:

- Orion
- SLOB
- Swingbench
- Hammerora

Just to note - these aren't necessarily about benchtesting "Oracle" as such, but they are great tools at seeing where the limits in your hardware stack are, ie, is the CPU sufficient, is the IO bandwidth sufficient etc etc...

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

About the two

GJ, February 21, 2017 - 12:26 pm UTC

Just to add a bit, the two databases are not necessarily replaceable. If comparision of scalabiility is considered for replacing Mongodb for Oracle. For all practical purposes they are to be considered seperately.

Mongodb nosql. Eventually consistent. No 100% guarantee that an update,insert,delete worked.

Oracle relational database. ACID compliant. Transaction either occurs or brings it back to the state before the transaction occured. 100% of the time. You dont get inconsistent answers from Oracle


Connor McDonald
February 22, 2017 - 1:19 am UTC

I dont think the question is about replacing one with the other. The statement was:

"We are going to do an assessment of a platform that uses both Oracle and MongoDB."


inconsistent answers from Oracle

Rajeshwaran, Jeyabal, February 21, 2017 - 5:10 pm UTC

....
Oracle relational database. ACID compliant. 
Transaction either occurs or brings it back to the state before the transaction occured. 100% of the time. 
You dont get inconsistent answers from Oracle
....


completely agreed, but here is an exception to that.

Session#1 - did this.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

demo@ORA12C> set feedback off
demo@ORA12C> drop table t purge;
demo@ORA12C> create table t as select 1 x, 0 y from dual;
demo@ORA12C> insert into t(x,y) values(2,0);
demo@ORA12C> set feedback on
demo@ORA12C> select * from t;

         X          Y
---------- ----------
         1          0
         2          0

2 rows selected.

demo@ORA12C> update t set y = 1;

2 rows updated.

demo@ORA12C> select * from t;

         X          Y
---------- ----------
         1          1
         2          1

2 rows selected.

demo@ORA12C>


Session#2 - did this.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

demo@ORA12C> select * from t;

         X          Y
---------- ----------
         1          0

demo@ORA12C> update t set y = y+1;



Update is blocked, since the session#1 holds the lock.

Now back into Session#1 and did this.

demo@ORA12C>
demo@ORA12C> commit;

Commit complete.

demo@ORA12C> select * from t;

         X          Y
---------- ----------
         1          1
         2          1

2 rows selected.

demo@ORA12C>


Now go back to session#2 and did this.

demo@ORA12C>
demo@ORA12C> update t set y = y+1;

2 rows updated.

demo@ORA12C> select * from t;

         X          Y
---------- ----------
         1          3  <<<===== Incorrect results.
         2          2

demo@ORA12C>


not sure if this is a Bug (to me it sounds like a bug!), let me know if this is still reproducible in 12.2 (sorry don't have access to that database) and any patch available for 12.1.0.2 database.

write 'consistency'

Rajeshwaran, Jeyabal, February 22, 2017 - 8:53 am UTC

Thanks Connor was able to understand the "restart" part.

demo@ORA12C>
demo@ORA12C> update t set y = y+1;

2 rows updated.

demo@ORA12C> select * from t;

         X          Y
---------- ----------
         1          3  <<<===== Incorrect results.
         2          2

demo@ORA12C>


But while this update makes progress from its blocking state, the value of Y should be one not two (since session#1 got committed, and consistent read of Y from session#2 should return 1 not 2).

so if we proceed with the consistent read of Y from session#1 - then after this update the value of Y should be 2 not 3. Did I miss something here ?
Connor McDonald
February 23, 2017 - 3:08 am UTC

Session 2 is doing this:
- consistent read data (finds y=0)
- go to do the update and blocked
- when finally released, sees that current mode block (y=1) does not agree with consistent read value (y=0).
- "abandons" the update
- restarts, this time doing read-for-update (ie locking as reading) to ensure we dont get in an endless loop of restarts
- finds y=1
- updates to y=2

and thus when you run *another* y=y+1 update, it ends up as 3.