From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bb5076a9e9f85a34 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-14 08:21:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn11feed!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc01.POSTED!not-for-mail Message-ID: <3F3BA8CF.7010709@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Table read before inserting a record using Recordset update References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 66.31.71.243 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc01 1060874461 66.31.71.243 (Thu, 14 Aug 2003 15:21:01 GMT) NNTP-Posting-Date: Thu, 14 Aug 2003 15:21:01 GMT Organization: Comcast Online Date: Thu, 14 Aug 2003 15:21:01 GMT Xref: archiver1.google.com comp.lang.ada:41460 Date: 2003-08-14T15:21:01+00:00 List-Id: > 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