performance-tuning

SQL Server performance and fully qualified table names

It seems to be fairly accepted that including the schema owner in the query increases db performance, e.g.: SELECT x FROM [dbo].Foo vs SELECT x FROM Foo This is supposed to save a lookup, because SQL Server will otherwise look for a Foo table belonging to the user in the connection context. Today I was told that always including the da...

PHP performance hampered by require()

I ran my code through xdebug profiler and saw more than 30 percent of the time is spent on the require() calls. What is the best way to improve on this? I saw some posts about using __autoload, but there were conflicting statements about it's affect on APC (which we use), and doubts about it's use to improve performance. ...

Diagnostic output of the Oracle Query Optimizer

There are many instances where we are not happy with the decisions that Oracle's cost-based-optimizer makes regarding the query execution plan. Using hints, less-than-straightforward query transformations, index reorganization and instance parameters we then try to coax it into doing what we think makes more sense. It is very much taking...

How to eager load grandchildren of an aggregate with NHibernate?

I have the following class structure: class TestCase { public IList<Step> Steps { get; set; } } class Step { public IList<Action> Actions { get; set; } } class Action { } I want to load a TestCase, all Steps, and all Events in one query and avoid the Select N+1 problem. This post solves the problem of loading the Steps with Te...

How to determine if a table has been accessed in the last month?

In Oracle 10, is it possible to determine when the last time a table was accessed? According to this article the data is there, but I'm not sure whether this is reset whenever the server is restarted, nor how to actually get the access information. We're actually trying to determine what tables are no longer used. ...

Improve the performance of an ASP.NET application

How to improve the performance of an ASP.NET application? Which are are the fields I should take care? The application includes DB connections and Image Parsing etc. ...

Websphere 6.1 - Precompile jsp files

What is the best way to precompile JSP files in Websphere (6.1)? I have looked at other questions related to JSP precompilations, but as each AppServer has specific settings, I would like to know specifically a solution for Websphere. I found some references in the net to edit the file ibm-web-ext.xmi: Add the following line before th...

Postgres Tuning

What are effective ways of writing faster queries specifically in Postgres? Please do not include generally good database practices (eg use indexes or normalization). I'm looking for hints like derived tables work faster than subqueries or using python string functions seems faster than the pgsql string functions. Ideally, this list w...

MySQL Performance: Single table or multiple tables

Hiya, I have a 8 sets of data of about 30,000 rows for each set, the data is the same structure just for different languages. The front end of the site will get relatively high traffic. So my question is regarding MySQL performance, if i should have a single table with one column to distinguish which set the data belongs to (i.e. colo...

How to find dispose and memory issues? C#

My app was using 150mb of memory not to long ago, now it is at 286mb. It slowly rises so i must be forgetting to dispose something. This isnt much of a problem for me since i have 4gb but i want to send this to others who have only 1gb of ram. other then going through the code line by line how can i find objects that need to be disposed ...

Can .NET based applications be expected to perform in this manner?

We have a "print engine" which basically picks pre defined tasks to run against a file and these "tasks" are .NET 2.0 - 3.5 (in C#) command-line applications. All it does is run one after the other and with the applications that we haven't developed internally, they run quite quickly, typically 10-30 ms. However, our .NET applicati...

slow sqlite insert using the jdbc drivers in java

I just inserted 1million records into a simple sqlite table with five columns. It took a whooping 18 hours in java using the jdbc drivers! I did the same thing in python2.5 and it took less than a minute. The speed for select queries seem fine. I think this is an issue with the jdbc drivers. Is there a faster driver for sqlite3 in jav...

Function in SQL Select Statement

CREATE VIEW View1 AS SELECT Col1, Col2, dbo.fn1(col2) as Col3 FROM TestTable /* --Instead of writing below query I created a new View View2 SELECT Col1, Col2, dbo.fn1(col2) as Col3 dbo.fn2(dbo.fn1(col2)) as Col4 FROM TestTable */ CREATE VIEW View2 AS SELECT Col1, ...

DOMContentLoaded/load (event), how to increase the speed.

I'm trying to do everything I can to increase the load speed of my pages, and in particular the ajax loaded components. In firebug, my out put looks like this I'm not entirely sure if I'm reading this correctly, but it is either +2.19s for DOMContentLoaded (or it mayonly be .8 if we are supposed to subtrack that from the waiting respo...

WITH Common Table Expression vs. CREATE VIEW performance

I have several queries which use a WITH clause, or Common Table Expression, with a UNION ALL statement to recur through a table with a tree like structure in SQL server as described here. Would I see a difference in performance if I were to CREATE that same VIEW instead of including it with the WITH clause and having it generated every ...

How to optimize Entity Framework Queries

I am using Linq-To-Entities to do a query which is returning only 947 rows but taking 18 seconds to run. I have done a "ToTraceString" to get the underlying sql out and ran the same thing directly on the database and get the same timing. I have used the tuning advisor and created a couple of indexes although with little impact. Lookin...

Impact for increasing the column length of an existing table.

The datatype of a column in a existing table is of type Char(4). Now, is there any impact while selecting that row if I increase the column length to say 10. ...

What do Clustered and Non clustered index actually mean?

I have a limited exposure to DB and have only used DB as an application programmer. I want to know about Clustered and Non clustered indexes. I googled and what I found was : A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one cluster...

JavaScript extractor: extract functions/objects that are really used in a web page from a library

This is a twin question to the following: http://stackoverflow.com/questions/1257225/javascript-stripper-remove-functions-objects-that-are-not-used-in-a-web-page To maximize my chance of getting my problem solved, I'm asking the question in opposite manner: All of my web pages use a JavaScript library, to improve the performance of my...

Performance penalty of typecasting and boxing/unboxing types in C# when storing generic values

I have a set-up similar to WPF's DependencyProperty and DependencyObject system. My properties however are generic. A BucketProperty has a static GlobalIndex (defined in BucketPropertyBase) which tracks all BucketProperties. A Bucket can have many BucketProperties of any type. A Bucket saves and gets the actual values of these BucketProp...