Tag Info

New answers tagged

2

I think the best way would be to "prove" that your subqueries - that are compared with a value - do always return one or no value. By making sure they all have either: TOP (1) ... ORDER BY ... (or the equivalent modern ORDER BY ... FETCH NEXT 1 ROWS ONLY) WHERE clause that uses the primary or a unique key, e.g.: WHERE table_id = 496 HAVING clause that ...


2

On server side trace DURATION is the total execution time (in ms) of a query. CPU column will provide you time on CPU (total of one or multiple CPUs). While DURATION - CPU = IO Time So If RPC-Completed time for single procedure call or total time is according to benchmarks then problem could be on network side. Where is actual problem. To get this you must ...


0

Unfortunately, there are no settings in SQL Profiler that will display the values the way you want them displayed with your insert .. values statement or any other similar statements. But, by using SP:StmtCompleted and SQL:StmtCompleted you should be able to see when the values are being assigned to the parameters. So you'll have an entry something like ...


1

Pretty much a WAG because you haven't shown EXPLAIN (BUFFERS, OUTPUT) data, but: select id from demo_bbb b; -- database query time: ~26ms If you're on 9.2 or newer this probably did an index-only scan on the unique index used to implement the primary key constraint. Given the latter times that's the most likely case; if it'd done a seqscan (as it would on ...



Top 50 recent answers are included