Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Improving sluggish SQL
Message
From
21/12/1999 17:12:25
 
 
To
21/12/1999 15:41:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00306158
Message ID:
00306989
Views:
39
>>>Or Just turn buffering on for table1 and do a tablerevert() within a begin/end transaction so that no changes get saved back to the table.
>>
>>Please show me how this is done. I've tried several different methods without success. What type of buffering on table1. Each time I've tried it the SELECT was ineffective. It selected all the records from table1, not just those that I had deleted in the DELETE FROM command. I would really appreciate a code snippet. Thanks in advance.
>
>Dore,
>
>Well after playing with it I have come to the same conclusion that you did. This will not work. I guess I just assumed that if you can see the buffered changes when you browse a table that you could do a select and get the buffered results. Looks like the select goes back to the table that is on the disk rather then the buffered changes or maybe

Thanks for the reply. I thought I was missing something really basic.
I think much of this is moot since I get nearly the same speed of execution doing

SELECT * FROM table1 WHERE somekey NOT IN (SELECT somekey FROM table2)

as with

DELETE FROM table1 WHERE somekey IN (SELECT somekey FROM table2)
followed by
SELECT * FROM table1 WHERE NOT DELETED()

so there's no real reason to do the DELETE FROM and change table1 in any way.
Previous
Reply
Map
View

Click here to load this message in the networking platform