Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 130371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:56:15+00:00 2026-05-11T05:56:15+00:00

We are developing an application with a persistence layer using OpenJPA1.1 and an Oracle

  • 0

We are developing an application with a persistence layer using OpenJPA1.1 and an Oracle DB as back end storage. I will use queries with subselects (see my question at Solving JPA query finding the last entry in connected list).

Now my colleagues at work remark, that such queries can lead to performance problems as the database is filled with thousands of customer date used by a few thousand concurrent user (which will be reality in production).

So, my question is: is there a ‘best practice’ using subselects in queries under this circumstances? And what must be considered by doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:56:16+00:00Added an answer on May 11, 2026 at 5:56 am

    I would first prove that it’s a problem. You’ll want to load the database up with dummy data and see how your queries perform as the database grows larger. Otherwise you are spending time optimizing something that may not be a problem.

    One thing to think about. In all the places I’ve worked, where things fall apart is not thousands of records, but millions. You’ve got this system, and it works fine for a while and then just starts slowing down even as you throw more hardware at it. The place I’m working now has about 70 million records in his history table dating back to 1998. Performance on some queries is horrible as a result and they’re spending a lot of time working around these issues.

    But at some point you really do have to ask. Do we need to keep data more than 4 years old in our transactional system? Or even 4 months old? This time limit depends on your business need, but if you keep your transactional system with only the data that is needed to process ongoing work… and archive into a data warehouse your historical records. You’ll improve your overall performance, because chances are it’s only occasionally you need to query that old data, so why keep it with your recent data?

    If you think about this up front, you’ll save a lot of headaches long term.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 218k
  • Answers 218k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I found out that there is an exception being thrown… May 12, 2026 at 11:31 pm
  • Editorial Team
    Editorial Team added an answer I don't think it is possible to add data rows… May 12, 2026 at 11:31 pm
  • Editorial Team
    Editorial Team added an answer This will accomplish what you're looking for: __(.*)(?=Dont) You seem… May 12, 2026 at 11:31 pm

Related Questions

I'm in the process of developing a multi-tiered financial processing application in Java using
In this application we are developing, we noticed that a view was particularly slow.
We are developing an application to do a hearbeat test of all our SQL
We are developing an application that involves a lot of different tests where each

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.