Re: Delete Only 50 rows from table
Posted in 2005
Serge Rielau said: >> >> 1. With a status flag. This has the added bonus of being able to >> re-route >> things or restart a process. If you delete the data, then how can you do >> this? > Isn't that what transactions are there for? Not necessarily. I've written plenty of applications where the user would have done everything "correctly", but you would still need to be able to re-start a batch or transaction. > What I see a lot is that multiple processing work of the same queue. > A process marks the "top" row as in process (and commits). Then it does > it's heavy lifting. Finally, the row is deleted. > Call it what you want but this is what's done out there. I'm sure you know what I'd call it. >> 2. You have an orders table. Outstanding orders get a different status >> flag. > And your order table keeps growing and growing and... And? > To find the next ordr to process I need to skip all the completes ones.. That's what indexes are for. > Do you have a todo-list at home? The ever increasing shopping list :-) Yes? >> 3. I'm not too sure why a warehouse staging table wouldn't be processed >> in >> full and then truncated, >> 4. See 1. And 2. > Not if you have a trickle feed. You keep on rolling that stone up the > hill, .... If I was processing a trickle feed, I'd wrap a transaction (either logical or actual) around processing a single row entirely. If you say "do this for N row, then do that, then do the other" and they're all completely independent of each other, then you could have some interesting data quality issues. Just in case it's unclear, I remain entirely unconvinced. If I might borrow someone else's tag line: "but hey, what do I know?" -- Bye now, Obnoxio "C'est pas parce qu'on n'a rien ' dire qu'il faut fermer sa gueule" - Coluche "I'm trying to see things your way, but I can't get my head up my ass" - JCH "Ogni uomo mi guarda come se fossi una testa di cazzo" - Marco Travel broadens a person. You look as if you have been all over the world. I went to the airport to check in and they asked what I did because I looked like a terrorist. I said I was a comedian. They said, "Say something funny then." I told them I had just graduated from flying school. -- Ahmed Ahmed http://i2.photobucket.com/albums/y41/Obnoxio/thinkIfoundtheproblem.jpg sending to informix-list