Your SAS programs, embedded in web apps and elsewhere

FK-PK - better performance

Reply
Regular Contributor
Posts: 163

FK-PK - better performance

Hi:
question:
I know that indexes are automatically built when creating , say, a FK to PK relation. And it is clear that indexes allow for the enforcement of rules when incoming rows are getting updated or coming in. My question is if having a FK to PK relation will increase performance when querying versus having plain indexes in both tables without IC. If there is a performance increase that the table with the FK does not need to consult its index but uses the PK index? Is there any performance boost when having IC as opposed to simple indexes?
Thanks
jp
SAS Employee
Posts: 284

Re: FK-PK - better performance

This forum is restricted to discussion of SAS Stored Processes.

http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/a003152554.htm

You might want to search support.sas.com for an answer to your question. Here is one page you might find helpful:

http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000403555.htm

Vince DelGobbo
SAS R&D
Super User
Posts: 5,254

Re: FK-PK - better performance

The main application for IC is updating tables, not querying.
I have seen no examples nor documentation that indicates that the SQL/WHERE-planner takes IC into account.
So my qualified guess is no, there is probably be no difference.
/Linus
Data never sleeps
Ask a Question
Discussion stats
  • 2 replies
  • 190 views
  • 0 likes
  • 3 in conversation