performance

Why sleeping between each data request from database gives me better performance?

I have an application that query set of records from sql server 2008 database, the performance is good when there is sleep between each data request (set of queries) than without sleeping. The following is the pesudo code for my scenario: for i =1 to end GetData Process //adding sleep here gives better performance I have run the sql p...

XQuery performance in SQL Server

Why does this quite simple xquery takes 10min to execute in sql server (the 2mb xml document stored in one column) compared to 14 seconds when using oxygen/file based querying? SELECT model.query('declare default element namespace "http://www.sbml.org/sbml/level2"; for $all_species in //species, $all_reactions in //reaction where data(...

Query result organization

I am trying to figure out the most efficient way to format this query. I have three tables - Transaction, Purchase and Item. The desired result is to select sales data (quantity/sales total) for each item for a specific client. the tables are formatted as follows: (=primary key)* Transaction: Transaction_ID*, Timestamp Purchase: P...

Why is this faster on 64 bit than 32 bit?

I've been doing some performance testing, mainly so I can understand the difference between iterators and simple for loops. As part of this I created a simple set of tests and was then totally surprised by the results. For some methods, 64 bit was nearly 10 times faster than 32 bit. What I'm looking for is some explanation for why this ...

performance difference between User Defined Function and Stored Procedures

If a statement return rows doing a simple select over the data base, is there performance difference between implement it using Function and Procedures? I know it is preferable to do it using function, but it is really faster? ...

IE 6 performance vs. clean, unobtrusive Javascript

Normally I love to keep my HTML code clean, semantic and free from either Javascript or CSS. I include my .JS and .CSS files at the top, and layer functionality on top of the DOM elements. The positives of this are: Architectural separation of concerns Graceful degradation where Javascript or CSS isn't supported Search-engine friendli...

Oracle performance via SQLDeveloper vs application

I am trying to understand the performance of a query that I've written in Oracle. At this time I only have access to SQLDeveloper and its execution timer. I can run SHOW PLAN but cannot use the auto trace function. The query that I've written runs in about 1.8 seconds when I press "execute query" (F9) in SQLDeveloper. I know that this i...

Any code tips for speeding up random reads from a Java FileChannel?

I have a large (3Gb) binary file of doubles which I access (more or less) randomly during an iterative algorithm I have written for clustering data. Each iteration does about half a million reads from the file and about 100k writes of new values. I create the FileChannel like this... f = new File(_filename); _ioFile = new RandomAccess...

Why is Oracle so slow when I pass a java.sql.Timestamp for a DATE column?

I have a table with a DATE column with time (as usual in Oracle since there isn't a TIME type). When I query that column from JDBC, I have two options: Manually convert the values with Oracle's to_date() Use a java.sql.Timestamp Both approaches work and have exclusive areas of hideousness. My problem is when I'm SELECTing data. Here ...

Where are Java final local variables stored?

Take the following example: public void init() { final Environment env = new Environment(); Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { env.close(); } }); } Firstly, where is env stored? Is it: copied by the compiler into a hidden member variable of the inner clas...

Same ASP.Net application - Multiple IIS Sites

Hi, A quick ASP.Net performance question... I have an ASP.Net 3.5 SP1 Application that I want to run on IIS 6. For SSL certificate reasons I need to run it on separate sites in IIS. It's a CMS, and some clients will need the add their own SSL certs. 1) Can I run the same set of ASP.Net files on the disk on multiple sites in IIS or do ...

Win32 IO Performance Problem

Recently I ran into a "fun" problem with the Microsoft implementation of the CRTL. tmpfile places temp files in the root directory and completely ignores the temp file directory. This has issues with users who do not have privileges to the root directory (say, on our cluster). Moreover, using _tempnam would require the application to rem...

.NET C# switch statement string compare versus enum compare

I'm interested in both style and performance considerations. My choice is to do either of the following ( sorry for the poor formatting but the interface for this site is not WYSIWYG ): One: string value = "ALPHA"; switch ( value.ToUpper() ) { case "ALPHA": // do somthing break; case "BETA": // do something else ...

Sql query optimization

I have a query that I want to execute that fastest possible. Here it is: select d.InvoiceDetailId,a.Fee,a.FeeTax from InvoiceDetail d LEFT JOIN InvoiceDetail a on a.AdjustDetailId = d.InvoiceDetailId I put an ascending index on AdjustDetailId column I then ran the query with 'Show Actual Execution Plan' and the result estimated subt...

KD-Trees and missing values (vector comparison)

I have a system that stores vectors and allows a user to find the n most similar vectors to the user's query vector. That is, a user submits a vector (I call it a query vector) and my system spits out "here are the n most similar vectors." I generate the similar vectors using a KD-Tree and everything works well, but I want to do more. I ...

How to add external CSS in a HTML file.

I know about CSS like this .style{ .. } I want to know how to add external css file in a HMTL page. One more thing using such external css dose it relay speed up the page load time. ...

Is it smart to put every small icon in one .NET ImageList control?

I'm developing a VB.NET WinForms application, and I'm using lots of small 16x16 32bit icons everywhere; most of which are nested behind tabs or otherwise invisible. I'm putting all of them in one big ImageList control, it seems easier to manage them from there. My question is, is this smart? I'm using the imagelist even in buttons, and ...

Improve ar archiving performance

I have a project with a huge amount of auto-generated code, which we build into a static library before linking into the final executable. We use gcc/gnat 5.04a There are so many files, we have to break the job into batches and invoke ar multiple times to construct the library (in order to avoid the command-line length limitation), e.g...

Suggestions for improving count performance on a SQL query?

I've got a query that is taking a very long time to run due to a select similar to: SELECT Count( Distinct t1.v1), Count (Distinct Case t2.v1 When 'blah' then t1.v1 Else null End ), .... FROM t1 LEFT JOIN t2 ON t1.v3 = t2.v3 WHERE t1.myDate BETWEEN @start and @end AND t2.v5 = @id Can anyone suggest any good methods for improving thi...

Merging multiple javascript files

I've read that merging several multiple javascript files into a single file improves performance, is that true? If so, is there an easy and error-free way of merging them, or perhaps an online-tool that automatically does that? Many thanks. ...