Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

where Condition for primary key

Former Member
0 Kudos

Dear all,

Is this necessary to take primary key in where condtion for any table?

Actually in release time some error is occured like............... Large table AFPO: No field of a table index in WHERE

..condition

thanx in advance

3 REPLIES 3

Former Member
0 Kudos

Hi,

Specifying primary key or secondary index will fetch the data faster from the DB table. if not it will take lots of time. For huge tables, it will definitely make a difference.

if not primary key, try to create an index with the fields you specified in the WHERE clause.

regards,

madhu

kiran_k8
Active Contributor
0 Kudos

Anshuman,

Using Primary key fields or index field in the where clause of a select statement will improve the performance of a report.But not using a primay key field or index field in the where clause will not generate any error.Probably the cause is something else.As said as you got an error while releasing I guess there might be some incosistency in terms of objects tagged to the task or paste the exact error message.

K.Kiran.

Former Member
0 Kudos

Hi,

it is not necessary to fetch data by using the primary key but as per the performance point of view u hv to fetch the data using primary key or create index and fetch the data using where condition.

The difference is if u fetch the data using primary key it will take very less time, or else it will take much time,

u will check it out with example.

with Regards,

Kiran.G