🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.databases
Article #35

Really S L O o o o o o o o o o o Update SQL - Need help, please

#35
From: Bill Artemik
Date: Thu, 04 Nov 1999 00:00
27 lines
1587 bytes
Part of my application's SQL is to update values of a sub quers with
zeroes where field values are null:

UPDATE MyTable
SET MyField = 0
WHERE MyField IS NULL

There are about 440,000 records in this dBase table that need to be
checked and zeroed out if need be.

This update process takes about 18 minutes in Local SQL.

If I run this in Delphi as procedural code and using a TTable it takes
less than half that time

I don't recall EVER having procedural code beat a SQL statement (well,
a well-constructed SQL statement, that is...)

Is there something else I can do to speed this up?
Bill Artemik
Programmer / Analyst
Droste Consultants, Inc.
bill@droste1.com


"There are THREE kinds of people in the world...
      Those that can count and those that can't."
Technical Details
Message-ID: <3823ac1e.9260953@news3.newscene.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffff5,b32b7d909ed95344,start
X-Google-Attributes: gidffff5,public
X-Google-Thread: 10de66,b32b7d909ed95344,start
X-Google-Attributes: gid10de66,public
X-Google-Thread: ff75c,b32b7d909ed95344,start
X-Google-Attributes: gidff75c,public
From: bill@droste1.com (Bill Artemik)
Subject: Really S L O o o o o o o o o o o Update SQL - Need help, please
Date: 1999/11/04
Message-ID: <3823ac1e.9260953@news3.newscene.com>
X-Deja-AN: 544428062
Content-Transfer-Encoding: 7bit
Organization: Droste Consultants, Inc.
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Reply-To: bill@droste1.com
Newsgroups: comp.lang.pascal.delphi.databases,borland.public.delphi.database.desktop,borland.public.delphi.database.sqlservers