• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Mongo aggregation using Spring of 2 collections 2 times slower than 9(!) separate JDBC pooled calls

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello! Mongo aggregation using Spring of 2 collections 2 times slower than 9(!) separate JDBC pooled calls
I have not this sample rigth now.
But both measurements where on collections/tables with 1-2 rows on same machine with local DBs.
Why?
Is it possible to speed up mongo?
Give samples, please.
THANKS!!!
 
Rancher
Posts: 4801
50
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Depends what you're doing.
Depends what the queries look like, and how they compare to the data stored.
Depends whether the DB queries have been cached or not.

All of that (and more) affects the timings.
 
Arthur Harkivsky
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe, statement caching was inside sql db, but not on java side.

Ghostly described mongo aggregation of 2 collections with 1-2 records wasted 200 ms(!) on core i7 9750H using local mongo.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which looks to me like an example attempting to prove a point, and may (or may not) be at all representative of how Mongo is used in the real world.
reply
    Bookmark Topic Watch Topic
  • New Topic