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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:22:45+00:00 2026-05-10T15:22:45+00:00

OK, so practically every database based application has to deal with non-active records. Either,

  • 0

OK, so practically every database based application has to deal with ‘non-active’ records. Either, soft-deletions or marking something as ‘to be ignored’. I’m curious as to whether there are any radical alternatives thoughts on an `active’ column (or a status column).

For example, if I had a list of people

CREATE TABLE people (   id       INTEGER PRIMARY KEY,   name     VARCHAR(100),   active   BOOLEAN,   ... ); 

That means to get a list of active people, you need to use

SELECT * FROM people WHERE active=True; 

Does anyone suggest that non active records would be moved off to a separate table and where appropiate a UNION is done to join the two?

Curiosity striking…

EDIT: I should make clear, I’m coming at this from a purist perspective. I can see how data archiving might be necessary for large amounts of data, but that is not where I’m coming from. If you do a SELECT * FROM people it would make sense to me that those entries are in a sense ‘active’

Thanks

  • 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-10T15:22:46+00:00Added an answer on May 10, 2026 at 3:22 pm

    You partition the table on the active flag, so that active records are in one partition, and inactive records are in the other partition. Then you create an active view for each table which automatically has the active filter on it. The database query engine automatically restricts the query to the partition that has the active records in it, which is much faster than even using an index on that flag.

    Here is an example of how to create a partitioned table in Oracle. Oracle doesn’t have boolean column types, so I’ve modified your table structure for Oracle purposes.

    CREATE TABLE people (    id       NUMBER(10),    name     VARCHAR2(100),    active   NUMBER(1) ) PARTITION BY LIST(active) (    PARTITION active_records VALUES (0)    PARTITION inactive_records VALUES (1) ); 

    If you wanted to you could put each partition in different tablespaces. You can also partition your indexes as well.

    Incidentally, this seems a repeat of this question, as a newbie I need to ask, what’s the procedure on dealing with unintended duplicates?

    Edit: As requested in comments, provided an example for creating a partitioned table in Oracle

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

Sidebar

Ask A Question

Stats

  • Questions 191k
  • Answers 192k
  • 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 You really can't. You can get some data from the… May 12, 2026 at 6:16 pm
  • Editorial Team
    Editorial Team added an answer The typical behavior of most browsers, to my knowledge, is… May 12, 2026 at 6:16 pm
  • Editorial Team
    Editorial Team added an answer This question is very similar to a variation of the… May 12, 2026 at 6:16 pm

Related Questions

OK, say that my application is emitting (x86) instructions into memory, making the page
I've got a library that I have to interface with which acts basically as
I need some mind reading here, since I am trying to do what I
Ok. So I have a list of values, and I'd like to do something

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.