Reputation
4,254
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
8 19
Newest
 Caucus
Impact
~336k people reached

9h
answered Is smallest to largest the rule of thumb in a multi-table JOIN?
1d
comment MYSQL find if a default value has been set for a table (DateTime Specifically)
Check INFORMATION_SCHEMA.COLUMNS table, column COLUMN_DEFAULT . More info - dev.mysql.com/doc/refman/5.1/en/columns-table.html
2d
comment Oracle migration to SQL Server
@jmonterohn : Then context_info won't work... As miracle173 said, temp table should do the job with some restrictions ( you will very likely end up with attribute-value table thus leaving type casting to the callee )
2d
comment Oracle migration to SQL Server
@miracle173 : I agree with your argument that there is only one CONTEXT_INFO (however, I don't see anything in the question that implies presence of another package variable)... The trigger will be influenced in any case because it relies on an object that is supposedly created by some external piece of code...
2d
comment Oracle migration to SQL Server
Package variables are not global, they persist for the duration of a session. In SQLServer you have similar behaviour (in your case) with ` CONTEXT_INFO ` - technet.microsoft.com/en-US/library/ms189252(v=SQL.105).aspx
Jul
28
comment Oracle tuning strategy for columns with long tails
You may try rewriting the query using WITH : WITH qr1 AS (select * from Order where Order_ID in (:1, ..., :100)) SELECT * FROM qr1 WHERE customer_id = :101 - it should increase the chances optimizer chooses the plan you want. It will be even more likely if you add MATERIALIZE hint : WITH qr1 AS (select /*+ MATERIALIZE */ * ....
Jul
27
awarded  Caucus
Jul
22
comment Converting Legacy SQL Server 2005 Stored Procedure to Transaction based for parallelism
What do you mean by "non-transactional" code ? Every statement is executed within the context of transaction (which in SQLServer may be implicit ,i.e. without explicit BEGIN TRANSACTION/COMMIT ) . Also, "nested" transactions are not really nested - only the outermost transaction matters.
Jul
22
answered Do not reject entire statement when deleting rows in batch
Jul
20
answered COUNT number of column values with INNER JOIN
Jul
17
awarded  Notable Question
Jul
16
comment Determine if a resultset exists quickly
@miracle173 : optimizer mode for this particular query. surely it won't affect settings for instance or session - dba-oracle.com/t_sql_tuning_rownum_equals_one.htm . Other optimizer modes - (docs.oracle.com/cd/B19306_01/server.102/b14237/… ) . Surely, exists as the name implies is useful to check for existence.
Jul
15
answered Determine if a resultset exists quickly
Jul
9
comment Grant execute on specific type in Oracle
type <type> is table of <something>; - does user has permissions on <something> ? It may be the case .
Jul
9
comment Execution plan for COMPUTE BY
It seems to me like a proprietary replacement for analytical clause in ; the same result will be with SUM(salary) OVER (PARTITION BY id) ...
Jul
9
answered Grant execute on specific type in Oracle
Jun
30
comment Getting milliseconds elapsed during a stored PL/SQL procedure
Normally dbms_utility.get_time is used for debugging purposes: docs.oracle.com/cd/B19306_01/appdev.102/b14258/… . You may also want to use some of DBMS_APPLICATION_INFO procedures to add more information for debugging your code
Jun
29
comment SQL retrieve last elements of table using group by like behaviour
@ypercube : Thanks, I missed that version is not of exact type. updated...
Jun
29
revised SQL retrieve last elements of table using group by like behaviour
added 457 characters in body
Jun
28
awarded  Yearling