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

  • SEARCH
  • Home
  • 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 7923219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:14:22+00:00 2026-06-03T17:14:22+00:00

I am trying to build a system using Java and MySQL 5.1.63 GA where

  • 0

I am trying to build a system using Java and MySQL 5.1.63 GA where there are some input tables and some output tables in database.
To populate output tables I have written a procedure which will be called from servlet and generate a lot of intermediate tables before finally populating output tables. There are a lot of calculations and can take time even upto a minute.

Input and output tables operate using user_id but intermediate tables simply contain value columns.

But I have following concerns:
1) what happens if two users trigger calculation sequence at once, how can I protect intermediate tables?

2) Can I use any other technique like temporary tables, etc.?

  • 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. Editorial Team
    Editorial Team
    2026-06-03T17:14:24+00:00Added an answer on June 3, 2026 at 5:14 pm

    The way to isolate each user is to have all intermediate calculations done in temporary tables. Per the MySQL Documentation:

    A TEMPORARY table is visible only to the current connection, and is dropped automatically when the connection is closed. This means that two different connections can use the same temporary table name without conflicting with each other or with an existing non-TEMPORARY table of the same name.

    So long as the input and output tables are all segregated by user_id you should be fine.

    Changing your code to use temporary tables may be pretty easy as well. Most times all you’ll have to do is add the word TEMPORARY to your CREATE TABLE statements like this:

    CREATE TEMPORARY TABLE foo [...]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a navigation system using categories table with hierarchies. Normally, the
I am trying to set up an automated build system on Windows using Cygwin.
I'm trying to build small web-system (url shortcutting) using nonsql Cassandra DB, the problem
I'm trying to build a file server using Java TCP sockets. I keep getting
I am trying to build a simple app using google app engine, with java
I am trying to build a system that uses nodejs with express to render
I am trying to build openid login system for my website. To do this
Trying to build sslsniff on a RHEL 5.2 system here. When compiling sslsniff on
I'm trying to use the System.IO.Log features to build a recoverable transaction system. I
I am trying to find a system/platform to build off of to make it

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.