home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!swrinde!mips!sdd.hp.com!uakari.primate.wisc.edu!zazen!news
- From: kmchylla@vms.macc.wisc.edu
- Newsgroups: comp.databases.ingres
- Subject: Re: ESQL Bug
- Message-ID: <1992Aug20.153621.26481@macc.wisc.edu>
- Date: 20 Aug 92 15:24:07 GMT
- Sender: news@macc.wisc.edu (USENET News System)
- Organization: University of Wisconsin Academic Computing Center
- Lines: 45
-
- >kmchylla@vms.macc.wisc.edu writes:
- >
- >|I wrote an embedded SQL program using C that seems to go into an
- >|infinite loop when I have too many records to process, and
- >|I can't figure out why. The program simply sets up a
- >|cursor to read each record, take a character field (storing
- >|a gregorian date) and convert it to a date. It updates another
- >|field in the same record (a date field), and fetches the next record.
- >
- >Richard Begg (richard@asis.unimelb.edu.au) answers:
- >Let me see if I've got this right...
- >
- >You have a cursor on which selects rows from a table, performs
- >some calculation then updates the row.
- >
- That is correct, sir! :-)
-
- >Have you declared the cursor for update?
- Yup!
-
- >How large is this table?
- ~150,000 records
-
- >How far does it get before it loops?
- On the 6610, the program will work if I cut the table up into smaller
- chunks of about 70,000 records. On the 4000, the table must be
- less than 20,000.
-
- >
- >Just a suggestion: This sort of operation is *VERY* inefficient in a
- >relational database (we found out the hard way!). If it is at all possible
- >to perform this operation in raw SQL operations rather than
- >using a cursor loop, then I would go for it, especially if the data set is
- >large.
- >
-
- I'd love to, but don't know of a way to take an unconventional
- gregorian date and convert it to a regular mm/dd/yy kind of date.
- Besides, I really am getting curious as to why a program would
- start looping without giving any SQL errors, any errors in the
- Ingres errlog, or VMS errors.
-
- Thanks for your questions!
-
- Kathy Chylla
-