Re: optimize union in ase query
The other thing you could try...... Query 1 & 2 are very similar (only a minor diff) as are Query 3 & 4.....so while other have been suggesting using 4 temps and doing the union, to me, you...
View ArticleRe: optimize union in ase query
btw - I could see how query1 & query2 need a union - as does query 3 and query 4....but wonder if the real query shouldn't be query 1unionquery 2union allquery 3unionquery 4 .....not sure if that...
View ArticleRe: optimize union in ase query
I think following 2 SARG are culprit in query 3 and 4. And F.TableName = 'S' --F is SecdealAnd B.TableName = '5' --b is SecSelBuyBck If there are no proper stats on these columns it must be using...
View ArticleRe: optimize union in ase query
Although I cannot send DDLs they allowed me to run and post the result for the "missing stats" script proposed by Abdelhak and I attach it along with the plan when I used "parallel" hints. I shall also...
View ArticleRe: optimize union in ase query
I do not see any missing stats in output... Can you check whether Tablename column has stats on table secdeal and SecSelBuyBck?
View ArticleRe: optimize union in ase query
Actually, what happened was he did a 'set option show long'....under the common misconception that it is the same as 'set option show on' but with more detail.......but it is different. Plus, looking...
View ArticleRe: optimize union in ase query
Hi, That compatibility mode message actual pre-dates compatibility mode :-), it does not mean compatibility mode is on. It could mean basic_optimization is on (but doesn't in this case). For all...
View ArticleRe: optimize union in ase query
RE: compatibility mode message.It will also do this when compatibility mode falls back on partial compatibility mode due it not qualifying for full compatibility mode, so yep, compat mode could be set...
View ArticleDefragmentation on SSD drives
We just moved our Sybase ASE15.7 databases from standard "mechanical" HDD drives to SSD drives (IBM SAN). We suspect that with SSD drives, ASE indexes/tables will require less maintenance against...
View ArticleRe: Defragmentation on SSD drives
1) Yes, still relevant. The SSDs make your physical i/o much faster, but performance will still be improved by reducing the number of physical i/os you have to do. The better the data is packed into...
View ArticleRe: Defragmentation on SSD drives
Regardless of drive storage technology, ASE uses cluster ratio's and the like (among many other factors) to choose optimal query plans. So these number very much matter. If comparing the same query...
View ArticleRe: optimize union in ase query
Hello, I shall try to provide some answers on the remarks of Simon and Jeff. Compatibility mode for sure was not on, although I set it during the tests, in that particular run was off (I checked...
View ArticleRe: optimize union in ase query
Hi, You should persist down the missing_stats route, it may well help to create a few histograms.Are you absolutely sure that compatibility mode (maybe at server level) was not on?The fact it is not...
View ArticleQuestion about Proxy table
1. Want to know if there is any different with following syntax to create proxy table for ase 12.5:CREATE TABLE dbo.my_proxy_table( id int not null, ....)LOCK DATAPAGESexternal table at...
View ArticleRe: Question about Proxy table
1 - quickest way to find out (and learn) what happens is to just do it (When in doubt, try it out!) and assuming no errors, compare the results (sp_help <proxy_table_name>; select * from...
View ArticleRe: Question about Proxy table
Thanks, Mark. Got a solution: create a physical table to hold the result set from sp instead of using proxy table.
View ArticleRe: optimize union in ase query
Did you check whether these columns have stats? Secdeal TableName SecSelBuyBck TableName
View ArticleASE CE 15.7 problem
My customer use ASE 15.7 CE sp110 on linux with 2 node , some application connection hang and block other process and cannot kill , ASE no report error , application process receive the following...
View ArticleIs it possible to create view from stored procedure for ase 12.5?
Suppose I have SP to return result set like: create proc mysp ( @param varchar(30) ) as begin //many logic here.... select col1, col2, col3, ... from #mytable...
View Article