If you are connecting to large data sources and are experiencing performance problems, a conversation with a database administrator (DBA) may be beneficial. Clear communication coupled with a small amount of database work could dramatically improve performance. The conversation should include database-tuning points, such as explicitly defining primary and foreign keys, defining columns as NOT NULL, and indexing. Each point will be discussed here.
Tuning data sources
Primary and foreign keys
Primary and foreign keys are essential for joining tables. A primary key is composed of one or more columns in a table. The primary key should be unique for every row. Joining on a non-unique, row-level key may lead to erroneous results...