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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:42:06+00:00 2026-06-14T21:42:06+00:00

Profile of the foreign keys FK Distinct Values % —- ————— —— Id1 1

  • 0

Profile of the foreign keys

FK      Distinct Values      %
----    ---------------  ------
Id1     1                 0.1%
,Id2    4                 0.3%
,Id3    5                 0.3%
,Id4    6                 0.4%
,Id5    6                 0.4%
,Id6    95                6.1%
,Id7    97                6.2%
,Id8    1423             90.7%

All foreign keys already make up the clustered Primary Key. This fact table is part of a star schema that includes 6 dimensions (Id’s 6,7, and 8 reference the same date dimension).

Fact table currently has approx 1800 rows (incredibly small), and is expected to grow by that amount each month.

Should each foreign key have its own non-clustered non-unique single column index for facilitating joins? If so, why?

Each foreign key will be part of a clustered index (primary key) in its dimension table.

If indexes should be put on the foreign keys, then what should the fill factor and padding index be set to given the low cardinality of the columns?

  • 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-14T21:42:07+00:00Added an answer on June 14, 2026 at 9:42 pm

    Your profile doesn’t really make sense with the “%” column – why are you finding the “percentage” of distinct values across fields? You need stats on the distribution of the distinct values – are 99% of the keys on Id8 the same ? are they evenly distributed? etc.

    Note that everything I’m saying here applies to larger tables. With 1800 rows / month, indexes are probably a waste of space and time for you to worry about.

    @jrara’s “rule” about indexing all the dims is an easy rule to apply, but you can easily make mistakes if that’s all you do. I don’t want to use an oracle bitmap index on my 100mil row customer dimension, for example.

    Indexing depends on what the queries look like against your data. Indexes won’t help if you are doing a full scan of the fact table to perform aggregation and grouping for “summary” reports. They will help when a user is trying to filter on an attribute of a dimension, and that filter results in you only having to look up a small percentage of the records from the fact table. Is there a main entry point to your table? Do people typically filter on an attribute of the “Id8” dimension, then want grouping on an attribute from the other dimensions?

    Essentially the answers to your questions are:

    Should each foreign key have its own non-clustered non-unique single column index for facilitating joins?

    In general, yes, so long as the dimension tables are small and the dim keys are relatively evenly distributed in the fact table. Usually it is worse to use a index access to get 99% of the fact table rows.

    what should the fill factor and padding index be set to given the low cardinality of the columns?

    Lowering the FILLFACTOR below 100% will cause slower index reads, since there are more (empty) pages in the index for the DB to read. Since a data warehouse is designed for fast selects, I don’t really ever recommend that you adjust the fillfactor down.

    That being said, in a few cases adjusting your FILLFACTOR may make sense. If the the fact table is very large (hundreds of GB / TB), and index rebuilds take hours, and you might only rebuild indexes once a month or even less. In these cases you need to figure out how much data (as a percentage) that you’ll be adding to the table each day, and set the fillfactor accordingly.

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

Sidebar

Related Questions

class Employee(Profile): designation = models.ForeignKey(Designation) keys = models.ManyToManyField(Keys) parent = models.ManyToManyField(Parent, blank=True, null=True) If
Given the Model: class Profile(models.Model): user = models.ForeignKey(User, unique=True) class Thingie(models.Model): children = models.ManyToManyField('self',
User profile. I have some attributes that have only 2 or 3 options. For
Possible Duplicate: Create provisioning profile in iphone application i developed my iphone app and
I've a user profile and would like allow the user update everything about himself(username,
When I do 'open .profile' in the terminal I have the following: export PATH=$PATH:/usr/local/git/bin
When I profile my app in Instruments 4.3, I get a bunch of leaks.
After getting a profile hash from the LinkedIn Ruby Gem, but I'm looking for
http://localhost/foo/profile/%26lt%3Bi%26gt%3Bmarco%26lt%3B%2Fi%26gt%3B The url above gives me a 404 Error , the url code is
I am trying to profile an application and I have a lot of instances

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.