We are new to sybase16 (upgraded from sybase7). We have a few places in our powerbuilder application where the datawindow has a select stmt with multiple UNIONs. If the separate stmts read from the same table, we are getting -307 All threads are blocked. This only happens on some new servers with multiple CPUs. It seems that sybase is splitting up the entire stmt amongst the cpus, and they somehow conflict and cause the error. Even though we are only reading rows. To solve this we were told to add this to the bottom:
OPTION(max_query_tasks=1)
This is working, because it is preventing sybase from splitting up the stmt amongst cpus.
I am being asked what the rule is, so that we can determine ahead of time which stmts will succeed and which will not.
Example:
SELECT * FROM table_a WHERE column_a = 'A'
UNION
SELECT * FROM table_a WHERE column_a = 'B'
Can you explain?
Thank you