home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / ingres / 1184 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.9 KB

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