comp.lang.ada
 help / color / mirror / Atom feed
* Table read before inserting a record using Recordset update
@ 2003-08-14 13:57 baskar
  2003-08-14 15:21 ` Robert I. Eachus
  0 siblings, 1 reply; 2+ messages in thread
From: baskar @ 2003-08-14 13:57 UTC (permalink / raw)


Hi,

Trying to insert a record using the records section option
(rs.addNew()). I think it reads the whole table. I'm using the query
"select * from table where primary key = 1" for opening the record
set. My DBA is reporting that she is seeing "select * from table"
query is issued very frequently (where as we never issue this query
from any where else).

I'm suspecting that addNew() function reads the whole table before
inserting the record, but not sure. Any ideas or suggestions?

Thanks !

Regards,
Baskar



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Table read before inserting a record using Recordset update
  2003-08-14 13:57 Table read before inserting a record using Recordset update baskar
@ 2003-08-14 15:21 ` Robert I. Eachus
  0 siblings, 0 replies; 2+ messages in thread
From: Robert I. Eachus @ 2003-08-14 15:21 UTC (permalink / raw)



> Trying to insert a record using the records section option
> (rs.addNew()). I think it reads the whole table. I'm using the query
> "select * from table where primary key = 1" for opening the record
> set. My DBA is reporting that she is seeing "select * from table"
> query is issued very frequently (where as we never issue this query
> from any where else).
> 
> I'm suspecting that addNew() function reads the whole table before
> inserting the record, but not sure. Any ideas or suggestions?

Sure, post to an appropriate newsgroup, and be sure to say which OS, 
database, and SQL binding you are using.

But more important, if you are using an RDBMS, such questions require 
knowing the schema for the database.  In an RDBMS, you can add data to a 
virtual table, and it may work--but not efficiently.  To get efficient 
updates, you usually have to add a (real) index to a real table.  And 
that question is appropriate to the right RDBMS group, but not here.

> Thanks !

You are welcome.  But please do not post any similar questions here, 
unless they are directly related to Ada or to an Ada binding to a 
particular database.  (You may have thought that this question was Ada 
related, but as you can see from the partial answer, it definitely is not.)

-- 
                                              Robert I. Eachus

"As far as I'm concerned, war always means failure." -- Jacques Chirac, 
President of France
"As far as France is concerned, you're right." -- Rush Limbaugh




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-14 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-14 13:57 Table read before inserting a record using Recordset update baskar
2003-08-14 15:21 ` Robert I. Eachus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox