Jump to content


Click the link below to see the new game I'm developing!


Photo

Default SQL and Delete mode


5 replies to this topic

#1 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 15 September 2004 - 12:04 AM

Probably only related to Oracle tables.

If you have default SQL selecting records, and have a LU that has the file in Delete mode, and no logics anywhere on any of the file logic points, then all the records in the file are delete.

It does not follow the select you make in the default SQL.

Kernel Version: 5.5r323
Platform: Any

Rob D.

#2 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 420 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 15 September 2004 - 07:09 AM

Rob is this in a LU within a Screen ?

Came across a problem with Default Logic and Mode Logic. For some odd reason, if we had select logic in Mode Logic, the file got cleared. Moved it to Default Logic and no longer a problem

#3 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 707 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 15 September 2004 - 08:46 AM

Rob,

Am I correct in assuming this is in "ProIV Bugs Confirmed" because ProIV have replied to you agreeing that it is a bug?

As a matter of interest, is the PARTIAL flag set on your LU?

Thanks.
Nothing's as simple as you think

#4 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 15 September 2004 - 10:50 AM

Hi,

Richard:

Nope, 'Confirmed' means that I have checked it myself.

Its more relavant for bugs posted form others.

I dont have the partial flag set.

Neil:

Not tried it in a screen, this test was in an update.

Rob.

#5 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 707 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 16 September 2004 - 09:34 AM

Ah, OK

I'd actually guess this could apply to any SQL database. From your description it would seem to be an issue with ProIV's "bulk delete" optimization - where there's a single file in delete mode with no logic I think ProIV tries to bypass the usual timing cycle and issue a single SQL DELETE for all the rows.

I guess maybe that can't work with explicit SQL because ProIV can't analyze your SELECT and morph it into the WHERE clause needed for the DELETE. This is kind of understandable but, if I'm guessing right, ProIV shouldn't be seeking to apply the "bulk delete" optimization where there is an explicit SELECT - that's the bug.

From your point of view you'd therefore probably get better performance by coding the DELETE statement directly and avoiding the whole problem.

Of course, this is all speculation.. :ermm:
Nothing's as simple as you think

#6 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 16 September 2004 - 10:40 AM

Spot on Richard,

Its easy to get around, once you know about it... but it could take you are while to figure it out.

Rob.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!