Hi list.  I have some tables and nearly all are set up so that the primary key is 
an auto-numbered field ('identity' in SQL-server), which is the value used 
system-wide to find records.

I have some very simple queries, which retrieve a lot of records.

I'm publicly hosted, and I'm getting errors that my db admin has limited the 
'cost' of the query and the query exceeds that so it's rejected.  The SQL, 
though, could not get any simpler.

Failing this ability to retrieve multiple records, I'm having to do loops 
everywhere (multiple queries, one for each record), which does work but then 
takes forever to process the overall page and load it, it's just not efficient to go 
back to the db 12 times i/o one.

I'm wondering if this could be a table indexing problem.  But I thought the 
primary key of a table was automatically indexed.  I haven't added any 
indexes to these tables because the variable values used to retrieve records 
are nearly always in the primary key.

Is this not so?  Would there be point to creating an index on a table when the 
index field is the primary key?

Thanks in advance for any thoughts.

Palyne


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to