Partial index || create

A partial index is a database index which has some condition applied to it such that it only includes a portion of the rows in the table.

This can allow the index to remain small even though the table may be rather large, and have fairly extreme selectivity.

Suppose you have a transaction table where entries start out with STATUS = ‘A’ (active), and then may pass through other statuses (’P’ for pending, ‘W’ for “being worked on”) before reaching a final status, ‘F’, at which point it is no longer likely to be processed again.

A useful partial index might be defined as:

 create index partial_status on txn_table (status) where status in ('A', 'P', 'W');

This index would not bother storing any of the millions of rows that have reached “final” status, ‘F’, and would allow queries looking for transactions that still “need work” to efficiently search via this index.

Similarly, a partial index can be used to index only those rows where a column is not null, which will be of benefit when the column usually is null.

  create index partial_object_update on object_table (updated_on) where updated_on is not null;

This index would allow the following query to read only the updated tuples:

  select * from object_table where updated_on is not null order by updated_on;

It is not necessary that the condition be the same as the index criterion; Stonebraker’s paper below presents a number of examples with indexes similar to the following:

  create index partial_salary on employee(age) where salary > 2100;


External links

  • The Case For Partial Indexes
  • ((Create(R))) -> Create Create(R) from Stone Design Corp, http://www.stone.com, is the original page layout, illustration and web authoring 3 in 1 application for Mac OS X. With
  • Create A New Command - YubNub.org Create A New Command. Hmm! Looks like you're creating a new command! Good for you, buckeroo! Create a New Command | Installing YubNub | Advanced Syntax
  • Create - Wikipedia, the free encyclopedia Create (television network), an American public television network consisting of lifestyle and human interest programming from the libraries of PBS and
  • Create Magazine & The Create Network Create Magazine is an award winning magazine that provides creative professionals with an insider's perspective on the people, news, trends and events that
  • south park create a character File Format: Shockwave FlashSOUTH PARK CREATE-A -CHARACTER BODY HEAD HAIR/HAT STUFF EYES MOUTH HANDS LEGS BACK GR SOUTH PARK CREATE-A -CHARACTER info: Make your own custom South Park
  • CAL: Projects: CREATE CAL partners with several institutions in the Center for Research on the Educational Achievement and Teaching of English Language Learners (CREATE),
  • Build Free Email Forms - myContactForm.com Create free contact forms, feedback forms, web forms, questionnaires, surveys, polls, or any other type of web form. No special servers or programming
  • Create Your Own Web Page Shows how to create a web page in seven simple steps.
  • CREATE CREATE is a first-of-its-kind partnership between the State of Illinois, City of Chicago, Metra and the nation's freight railroads.
  • Create Survey CreateSurvey - Web Survey Software: conduct online surveys using advanced web survey software. Create Survey is an easy-to-use web-based software to conduct

No Comments to “Partial index || create”  

  1. No Comments

Leave a Reply

You must log in to post a comment.