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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:38:39+00:00 2026-06-05T23:38:39+00:00

in a simple partitioned table: — note: no records stored in base, only inheritors

  • 0

in a simple partitioned table:

-- note: no records stored in base, only inheritors of base
create table base(
   base_id       bigint,
   base_tp       char(3) not null,
   ... );

create table base_abc(
   base_id       bigserial   primary key,
   base_tp       default 'abc'
                 check( base_tp = 'abc' ),
   ...
) inherits( base );


create table base_efg(
   base_id       bigserial   primary key,
   base_tp       default 'efg'
                 check( base_tp = 'efg' ),
   ...
) inherits( base );

if the the where clause in a query were to use base_tp, eg,

select * from base where ... and base_tp='abc'

would under 9.2 the query be optimized to select only table base_abc or would it, as it does currently, query a base, base_abc, and base_efg?

  • 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-05T23:38:40+00:00Added an answer on June 5, 2026 at 11:38 pm

    Well, this behaviour can be set via the constraint_exclusion config option. If it’s on, then only the partitions with matching constraint(s) will be accessed. But you should be careful, and choose partition instead in order to avoid a heavy performance hit. It’s just the same considering partitioned tables, but leaves others unaffected.

    Have a look at its documentation.

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

Sidebar

Related Questions

Simple case of trying to prove I can convert NSString to NSDate . Create
I set up a set of partitioned tables per the docs at http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html CREATE
I created a hive table as in Create external with Partition I am using
I have a Patient information table with ~50 million records. I need to check
I'm using a partitioned postgres table following the documentation using rules, using a partitioning
So, I have a .NET program doing batch loading of records into partitioned tables
I'm working with Windows Azure Table Storage and have a simple requirement: add a
This is my table CREATE TABLE IF NOT EXISTS `results_stock_all` ( `Result_Id` varchar(50) NOT
I am referring to http://www.if-not-true-then-false.com/2009/11/howto-create-postgresql-table-partitioning-part-1/ To reproduce the problem, here is some simple steps
I once had a MySQL database table containing 25 million records, which made even

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.