Hi All,
I have two choices when writing a SQL statement with COUNT function.
SELECT COUNT(*) FROM
SELECT COUNT(some_column_name) FROM
In terms of performance what is the beast SQL statement?
can I obtain some performance gain by using option: 1 ?
Thanks,
Upul
...
Structure of Example table:
Id, Integer (PK)
Name, Varchar(100)
Description, Text
I need to know if exists difference in performance between:
SELECT COUNT(*) FROM Example;
and
SELECT COUNT(Id) FROM Example;
Or does not exists differences?
...
I have created a class module for an entity called Terminal. I have a method that populates this class by going through 175 seperate worksheets and pulling the correct data from specific cells. This process is very quick (about 2 seconds), however when I try to write this data back out to a new worksheet, it is taking much longer (45 s...
OK So I have this list of products that are in the cart. I am trying to retrieve all the related items to the items in the cart without pulling any items that are in the cart.
I wrote this query and it pulls exactly what I want, but its taking like 8 seconds to run.
SELECT * FROM cart_product
WHERE product_id
IN(
SELECT product_r...
I have an array of 2000 items, that I need to display in html - each of the items is placed into a div. Now each of the items can have 6 links to click on for further action. Here is how a single item currently looks:
<div class='b'>
<div class='r'>
<span id='l1' onclick='doSomething(itemId, linkId);'>1</span>
<span id='l2' on...
Several keys in a SQL Server 2005 database I inherited have very high fragmentation percentages. When using the following SQL:
select OBJECT_NAME(object_id), avg_fragmentation_in_percent, record_count, *
from sys.dm_db_index_physical_stats (DB_ID(N'FragmentedDB'), NULL, NULL, NULL, 'Detailed') s
I see that several tables with fra...
I have a query from a web site that takes 15-30 seconds while the same query runs in .5 seconds from SQL Server Management studio. I cannot see any locking issues using SQL Profiler, nor can I reproduce the delay manually from SSMS. A week ago, I detached and reattached the database which seemed to miraculously fix the problem. Today whe...
Hi,
could anyone suggest a way (other than using Task Manager) to track and log a program's usage of CPU and RAM in order to profile its performance?
I'm working under Windows.
Something generic would be useful. A more specific request solution would involve Visual Studio. I've tried Performance Wizard, but it doesn't seem to give me t...
Hi,
as part of the process of populating a search engine, I populate a Berekely-DB value-store as well. This process is repeated each night and at the moment +/- 60% of the total running time each night is caused by creating the values to be inserted into the value-store ( so excluding the actual insertion into Berekely-DB and the time...
I need to write a program (a project for university) that solves (approx) an NP-hard problem.
It is a variation of Linear ordering problems.
In general, I will have very large inputs (as Graphs) and will try to find the best solution
(based on a function that will 'rate' each solution)
Will there be a difference if I write this in C-sty...
I am seeing very poor page set-up time in IE using jeditable.
The page has a table in which each row has 13 span elements to which jeditable is applied as follows:
$(document).ready(function() {
$('#entry_pl span.ples').editable('my_xhr.php', {
placeholder: '<span class="placeholder">unset</span>',
indicator: '<img src...
I found this page describing a number of algorithms for computing the factorial. Unfortunately, the explanations are terse and I don't feel like sifting through line after line of source code to understand the basic principles behind the algorithms.
Can anybody point me to more detailed descriptions of these (or other fast) algorithms f...
I have been reading articles about state management in ASP.NET for few days for my web application.
In this application, one user can create/save/execute queries, and I need to keep each parameter of a query before the user can save the query.
These parameters are string values, but the global size for one user may exceed few megabytes....
An architect at my work recently read Yahoo!'s Exceptional Performance Best Practices guide where it says to use a far-future Expires header for resources used by a page such as JavaScript, CSS, and images. The idea is you set a Expires header for these resources years into the future so they're always cached by the browser, and whenever...
I'm trying to optimize a concurrent collection that tries to minimize lock contention for reads. First pass was using a linked list, which allowed me to only lock on writes while many simultaneous reads could continue unblocked. This used a custom IEnumerator to yield the next link value. Once i started comparing iteration over the colle...
Hi,
I'm looking for a freeware / simpler alternative to JMeter. It is a very complete yet complex tool and all I need is to simulate a number of simultaneous calls to a site, grab stats about performance (time to the response) and see how many concurrent calls it can endure without breaking. Some chart thrown in would be useful.
Thanks....
Hi,
I've found various ways to track down CPU's and RAM's usage from within a process, in C#. I'd like to obtain those infos for an external program (like providing its PID).
Is there anything in the .NET framework that can help me?
Thanks
...
Basically I'd like to do something like that:
int[3] array_func()
{
return {1,1,1};
}
int main(int argc,char * argv[])
{
int[3] point=array_func();
}
But that doesn't seem legal in C++. I know I can use vectors, but since I know the size of the array is a constant, it seems like a loss of performance is likely to occur.
I'd a...
I create my own FrameworkElement and override VisualChildrenCount{get;} and GetVisualChild(int index) by returning my own DrawingVisual collection instance.I have override OnRender .
I will add 20-50 DrawingVisuals in this FrameworkElement ,every DrawingVisual will have 2000 line segments.The logic value of these points between 0 to 600...
We're using the following approach to writing out text files:
public void WriteFile(string filePath, string contents)
{
if (string.IsNullOrEmpty(filePath)) { throw new ArgumentNullException("filePath"); }
if (contents == null) { throw new ArgumentNullException("contents"); }
if (File.Exists(filePath))
{
throw ne...