#DateForumTypeThreadPost
4002 Oct 2015 @ 10:33 PDTDatabaseReplySliding Window Merge Join QuestionSliding window merge join is a costly operation compared to a rowkey based merge join, if your explain shows Rowkey based merge join i would not try changing anything there.
3901 Oct 2015 @ 08:28 PDTDatabaseReplySliding Window Merge Join QuestionCan you please try adding Stats on ( PARTITION ),  (  PARTITION, PI)  and ( PARTITION, PI, Partition Column) and check your results? Below is the excerpt from Carrie's Blog...
3801 Oct 2015 @ 07:49 PDTDatabaseReplyhow to use top and sample in a select statement with multiple joinsYou are right, I was thinking this is as a Syntax only question, thanks for your correction.
3701 Oct 2015 @ 07:14 PDTDatabaseReplyhow to use top and sample in a select statement with multiple joinsYou can use the same syntax, instead of * use  the columns you need to view. select Top 10 a.cola b.colb c.colc d.cold ... hundres lines of code here... from a left join b on a.c...
3601 Oct 2015 @ 07:05 PDTDatabaseReplySliding Window Merge Join QuestionWhat were your Stats definitions in all these cases ?
3528 Sep 2015 @ 12:35 PDTGeneralReply1 MB data block size in 14.10Hi Roland, I Guess your assumption is right for Alter, Bigger Datablocks store more rows and so number of Data Blocks used will also be less, so will be the the Data block splits as well. 
3422 Sep 2015 @ 01:17 PDTDatabaseReplyNeed help with nested cursorsPlease use this SQL   SELECT T1.NAME1,T2.NAME2, EDITDISTANCE(T1.NAME1,T2.NAME2) AS ED_VAL FROM TABLE1 T1 CROSS JOIN TABLE2 T2 QUALIFY ROW_NUMBER ( ) OVER (PARTITION BY T1.NAME1 ORDER B...
3322 Sep 2015 @ 10:42 PDTDatabaseReplyNeed help with nested cursorsCan you try cross join of 2 tables and select Minimum on Editdistance val group by the 1000 names ?  
3221 Sep 2015 @ 07:27 PDTDatabaseReplyNumeric overflow for decimal (38,4)Thanks Dnoeth !!
3121 Sep 2015 @ 07:06 PDTDatabaseReplyNumeric overflow for decimal (38,4)Also, Below queries could help you identifying the records that would fit in 38,4   --- When the product of 4 columns goes beyond 38,4 SEL CAST ( CAST ( CAST(3571893687 AS DECIMAL (...
3018 Sep 2015 @ 12:05 PDTDatabaseReplyNumeric overflow for decimal (38,4)Is your actual data type is DECIMAL(38,4) or DECIMAL (38,0) ?  Also can you please give the Max values in those 4 columns?
2917 Sep 2015 @ 01:15 PDTDatabaseReplyConcurrent insert and read on same tableLocking level will be at the table only, however you can get performance improvement while accessing the rows using partition columns. Basically you can request all 50 requests/instance at the...
2817 Sep 2015 @ 07:07 PDTDatabaseReplyDrop or Delete Which one is better for this scenario?Thanks Fred
2716 Sep 2015 @ 07:45 PDTDatabaseReplyDrop or Delete Which one is better for this scenario?Hi Ulrich thanks for your response, Its a full refresh, we clear all the data and re-load the 5 years of data from foundation tables. again next week we repeat the same process.  My question ...
2616 Sep 2015 @ 06:48 PDTDatabaseReplyDrop or Delete Which one is better for this scenario?any inputs on this please, Mainly i would like to know, if there is a SI on a table, when we do a Delete or Delete All, will it follow fast path delete or not.
2515 Sep 2015 @ 07:56 PDTDatabaseTopicDrop or Delete Which one is better for this scenario?I have 2 tables one having 800 Million Records and other having 150 Million Records, both these tables are full refresh tables on a weekly basis. Both the tables are date partitioned, having U...
2410 Sep 2015 @ 11:30 PDTDatabaseReplycreate table as - Failed 3706 Syntax error: expected something between ')' and the ';'.Pls add " WITH DATA " in the end and run the code. Below is the syntax Creat Table <db_name>.<table_name> AS ( <SQL> ) WITH DATA ;
2309 Sep 2015 @ 12:42 PDTDatabaseReplyPrimary index of PPI table has to be NUPI... Why is this so????Not necessarily, unless you have Partition column outside of UPI. Also for rows in a Table, uniqueness is achieved by combining internal partition number ( 0 for NPPI Table) , row hash and uniquene...
2204 Sep 2015 @ 10:34 PDTDatabaseReplyTearadata Stored procedure problem CREATE PROCEDURE SANDBOX.US_STATE_1() BEGIN INSERT INTO US_STATES VALUES('Alabama','AL','Montgomery','Birmingham'); END; SEL * FROM DBC.DBCINFO cal...
2104 Sep 2015 @ 06:50 PDTDatabaseReplysyntax help SEL OREPLACE ( ' regional banking of abcd' , 'regional banking', '') --in your case SEL OREPLACE ( ultra_region, 'regional banking' , '') FROM lu_reg...
2003 Sep 2015 @ 01:55 PDTDatabaseReplyTable Size/NoPI vs PIThanks Todd for your clarification, i was doing some research in it.
1903 Sep 2015 @ 01:54 PDTDatabaseReplyGrant Access to Stored Procedure and Hide Underlying TablesStored proc or a View database can help you on this. But depends on the scenario how you would want to use it. if it is jus selecting records from the table its better we can go ahead with View Da...
1802 Sep 2015 @ 07:13 PDTDatabaseReplyavg sale of quarter with previous quarter sale CREATE VOLATILE TABLE TEST AS ( SEL  PRODUCT ,YR ,QTR ,AVG ( SALES) AS AVG_SALE ,ROW_NUMBER () OVER (ORDER BY YR,QTR) AS R_NUM FROM  SANDBOX.TEST_SKV GROUP BY 1,2,3 ) WIT...
1701 Sep 2015 @ 02:42 PDTDatabaseReplyNeed Column Name with Longer than 30 Characters select DATABASENAME AS "this is a required 33 char string" from    dbc.databases where   databasename like '%calendar%' Result: this is a requi...
1601 Sep 2015 @ 02:36 PDTDatabaseReplyavg sale of quarter with previous quarter sale Create Volatile table test AS ( SEL  PRODUCT ,YR ,QTR ,AVG ( SALES) AS AVG_SALE ,ROW_NUMBER () OVER (ORDER BY PRODUCT,YR,QTR) AS R_NUM FROM  SANDBOX.TABLE_SRC GROUP BY 1,2...

Pages