performance-tuning

Alternative or succesor to GDBM

We a have a GDBM key-value database as the backend to a load-balanced web-facing application that is in implemented in C++. The data served by the application has grown very large, so our admins have moved the GDBM files from "local" storage (on the webservers, or very close by) to a large, shared, remote, NFS-mounted filesystem. This ...

SQL Server database with MASSIVE amount of tables

I've been asked to troubleshoot performance problems in a SQL Server 2005 database. The challenge is not a huge amount of data, but the huge number of tables. There are more than 30,000 tables in a single database. The total data size is about 650 GB. I don't have any control over the application that creates all those tables. The appl...

Internet Explorer Javascript performance problem

JavaScript performance in Internet Explorer sucks. No news there. However there are some tips and tricks to speed it up. For example, there is this three part series. Still I find myself unable to squeeze decent performance out of it. Perhaps some of you have an idea what else to do so it was speedier? What I want to do is create a medi...

How find performance bottleneck in iPhone

Hi, I'm new to Obj-c programing, and wonder how find a performance bottenecj. I have a UITable that load chunks of 50 objects from a sqlite database. Then, when the user scroll, I load the next 50 objects until finish. However, I find that the scrolling stop for a seconds. I wanna know why. I don't think that 50 objects is that muc...

Is there a CEIL version of MySQL's DIV operator?

With MySQL a DIV b is much faster than FLOOR(a / b). But I need to round up so I'm using, CEIL(a / b) It seems strange that there wouldn't be a ceiling version of DIV, but I can't find it. Is there anything undocumented hidden away somewhere? Or any other non floating point way to do this? ...

Please can anyone explain How to read a Execution Plan for Poorly Performed Query in SQL Server?

Please can anyone explain How to read a Execution Plan for Poorly Performed Query in SQL Server? ...

How do I improve performance of a SQL UPDATE statement whose SET involves an expensive aggregate subquery?

I have the following UPDATE scenario: UPDATE destTable d SET d.test_count = ( SELECT COUNT( employee_id ) FROM sourceTable s WHERE d.matchCode1 = s.matchCode1 AND d.matchCode2 = s.matchCode2 AND d.matchCode3 = s.matchCode3 ...

To multiple thread or not

I'm creating a windows console application that will read text file line by line and extract the data from the string that is fixed length data. The application is written as windows application for now but will convert to windows console app later on. I've notice that it take a while for the application to run from reading the text, ins...

Does the Sun JVM slow down when more memory is allocated via -Xmx?

Does the Sun JVM slow down when more memory is available and used via -Xmx? (Assumption: The machine has enough physical memory so that virtual memory swapping is not a problem.) I ask because my production servers are to receive a memory upgrade. I'd like to bump up the -Xmx value to something decadent. The idea is to prevent any he...

How to scale MySQL with multiple machines?

I have a web app running LAMP. We recently have an increase in load and is now looking at solutions to scale. Scaling apache is pretty easy we are just going to have multiple multiple machines hosting it and round robin the incoming traffic. However, each instance of apache will talk with MySQL and eventually MySQL will be overloaded. ...

What, if any, is the resource penalty for using System.Diagnostics.Stopwatch?

For example foo() //Some operation bound by an external resource. db,I/O, whatever. vs. var watch = new Stopwatch(); watch.Start(); foo() var time = watch.ElapsedMilliseconds watch.Stop(); ...

How to order fields on index creation (SQL Server 2005 +) ?

As this article's figure 4 says, SQL Server 2005 + can return you a list of missing indexes. It stores 2 important info about missing indexes: [EqualityUsage],[InequalityUsage] If I have a missing index where: [EqualityUsage]='col1',[InequalityUsage]='col2' Should I create an index with Indexed Key Columns: 'col1,col2' or 'col2,co...

What makes a SQL statement sargable?

By definition (at least from what I've seen) sargable means that a query is capable of having the query engine optimize the execution plan that the query uses. I've tried looking up the answers, but there doesn't seem to be a lot on the subject matter. So the question is, what does or doesn't make an SQL query sargable? Any documentat...

What is the advantage of using an INCLUDE column with a SQL Server index?

create nonclusterd INDEX index_name ON <object> ( column [ ASC | DESC ] [ ,...n ] ) [ INCLUDE ( column_name [ ,...n ] ) ] [ WHERE <filter_predicate> ] In the above syntax we will specify non-key columns in the INCLUDE,what is the advantage in specifying non-key columns? Please help me. Thanks in advance ...

Oracle Query Tuning (Duplicate table access)

I'm trying to further tune this query. The query returns the status for three different tests for each sample. However, if I wish to further filter the samples returned, I have to put the conditions in both 'SELECT ... FROM sample ...' queries. Can this query be rewritten referencing the sample table only once? SELECT sample_id, ...

Should I use an auto-generated Primary Key if I'm just doing a lookup table?

I have a table which has two varchar(Max) columns Column 1 Column 2 ----------------------- URLRewitten OriginalURL its part of my url re-writing for an asp.net webforms site. when a url comes in I do a check to see if its in the table if it is i use the OriginalURL. My question is, if all I'm doing is querying the table for ...

Can I make this faster?

Well I have a series of sps that are running a data warehousing solution that we have developed in house. While on the most part it runs pretty good, there is one stored procedure that runs really slow. It takes about 30 minutes on average to execute. I know exactly where the bottle neck is, I just don't know how to fix it. Basically...

Table Join Efficiency Question

When joining across tables (as in the examples below), is there an efficiency difference between joining on the tables or joining subqueries containing only the needed columns? In other words, is there a difference in efficiency between these two tables? SELECT result FROM result_tbl JOIN test_tbl USING (test_id)...

SQL Server: Event does not reference any tables (Tuning Advisor warning)

I have an application written in C# which uses Linq2SQL for communicating with the SQL Server. There are some queries that run a bit (very) slow, and I figure it probably need some indexes to speed things up. But I don't really know how to do that or on what or where or what I should or should not do. So I was thinking I could ask here,...

Most approprieted index for short-lived columns

In my current project, some tables have a column named "changed", which indicates if the the current line had been changed since the last check. All the insert and update statements includes this column. Every hour, I run a schedulated task that queries all changed rows, do some stuff with those rows and then sets null to it's "changed"...