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 120475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:49:02+00:00 2026-05-11T03:49:02+00:00

I recently started working at a company with an enormous enterprisey application. At my

  • 0

I recently started working at a company with an enormous ‘enterprisey’ application. At my last job, I designed the database, but here we have a whole Database Architecture department that I’m not part of.

One of the stranger things in their database is that they have a bunch of views which, instead of having the user provide the date ranges they want to see, join with a (global temporary) table ‘TMP_PARM_RANG’ with a start and end date. Every time the main app starts processing a request, the first thing it does it ‘DELETE FROM TMP_PARM_RANG;’ then an insert into it.

This seems like a bizarre way of doing things, and not very safe, but everybody else here seems ok with it. Is this normal, or is my uneasiness valid?

Update I should mention that they use transactions and per-client locks, so it is guarded against most concurrency problems. Also, there are literally dozens if not hundreds of views that all depend on TMP_PARM_RANG.

  • 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-11T03:49:03+00:00Added an answer on May 11, 2026 at 3:49 am

    Do I understand this correctly?

    There is a view like this:

    SELECT * FROM some_table, tmp_parm_rang   WHERE some_table.date_column BETWEEN tmp_parm_rang.start_date AND tmp_parm_rang.end_date; 

    Then in some frontend a user inputs a date range, and the application does the following:

    1. Deletes all existing rows from TMP_PARM_RANG
    2. Inserts a new row into TMP_PARM_RANG with the user’s values
    3. Selects all rows from the view

    I wonder if the changes to TMP_PARM_RANG are committed or rolled back, and if so when? Is it a temporary table or a normal table? Basically, depending on the answers to these questions, the process may not be safe for multiple users to execute in parallel. One hopes that if this were the case they would have already discovered that and addressed it, but who knows?

    Even if it is done in a thread-safe way, making changes to the database for simple query operations doesn’t make a lot of sense. These DELETEs and INSERTs are generating redo/undo (or whatever the equivalent is in a non-Oracle database) which is completely unnecessary.

    A simple and more normal way of accomplishing the same goal would be to execute this query, binding the user’s inputs to the query parameters:

    SELECT * FROM some_table WHERE some_table.date_column BETWEEN ? AND ?; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently started working on a web application at a new company and
I have recently started a new job, and the company uses Visual SourceSafe for
I just recently started working on a database-heavy Clojure application and am attempting to
I have recently started working for a new company and am now working on
Recently I have started work in one company. Previously I was working only with
I have recently started working on a legacy application that has most of its
I've recently started working with an application written using Adobe Flex 3. We're using
This is a very elementary I realize, I have recently started working with asp.net
Is OSCommerce outdated? I recently started working for a web development company that uses
I have recently started working in Java and J2EE and have theoritical knowledge of

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.