Can Sybase handle 70K arguments in an IN section? All the databases that I worked with have some limitation on the number of arguments for the IN clause. For example, Oracle has a limit of about 1000.
Can you create a subselect instead of an IN clause? This will reduce sql. Maybe this can help for so many values ββin the IN section. Something like that:
DELETE FROM OUR_TABLE WHERE ID IN (SELECT ID FROM somewhere WHERE some_condition)
Deleting a large number of records can be accelerated with some database interventions, if the database model allows. Here are a few strategies:
I would try a combination of 1, 2 and 3. If this does not work, then 4. If everything is slow, I will look for a larger box - more memory, faster disks.
zendar
source share