performance

Optimize sql update

We have 2 tables called TableToUpdate and Dates. We need to update TableToUpdate's EndTimeKey column by looking from other table Dates. We run sql below to do this, but it takes to long to finish. Table TableToUpdate has 6M records. Table Dates has 5000 records. How can we optimize it ? Thanks for replies ! update TableToUpdate set E...

In SQL, How does using DISTINCT affect performance?

I am attempting to select a distinct list where duplicates are created over several fields. For example, SELECT tablename.field1Date, tablename.field2Number, tablename.field3Text FROM tablename; Would select duplicating records over the date, number and text fields respectively. Now, when I select distinct records t...

Smart choice for primary key and clustered index on a table in SQL 2005 to boost performance of selecting single record or multiple records

EDIT: I have added "Slug" column to address performance issues on specific record selection. I have following columns in my table. Id Int - Primary key (identity, clustered by default) Slug varchar(100) ... EntryDate DateTime Most of the time, I'm ordering the select statement by EntryDate like below. Select T.Id, T.Slug, ..., T.Ent...

How much does wrapping inserts in a transaction help performance on Sql Server?

Ok so say I have 100 rows to insert and each row has about 150 columns (I know that sounds like a lot of columns, but I need to store this data in a single table). The inserts will occur at random, (ie whenever a set of users decide to upload a file containing the data), about a 20 times a month. However the database will be under conti...

javascript and css loadings

I was wondering, If I have, let's say 6 javascripts includes on a page and 4-5 css includes as well on the same page, does it actually makes it optimal for the page to load if I do create one file or perhaps two and append them all together instead of having bunch of them? ...

Best practices for performance benchmarking test..

I have a J2EE web-application running on Sun hardware with OpenSolaris/Glassfish stack. We're starting our performance benchmarking tests, to prepare for our scalability requirements later. Any guidelines/best practices would be very useful.. ...

Coding Priorities: Performance, Maintainability, Reusability?

This came about mainly due to answers to SQL questions. UDF's and Sub Queries are intentionally omitted because of performance. I didn't include reliability not that it should be taken for granted, but the code has to work. Does performance always come first? So many answers are provided with performance as the main priority. My users s...

Read from main memory and cache in Assembly

So I am being taught assembly and we have an assignment which is to find the time difference between reading from memory and reading from cache. We have to do this by creating 2 loops and timing them. (one reads from main memory and the other from cache). The thing is, I don't know and can't find anything that tells me how to read from e...

Which embedded database capable of 100 million records has the best C API

I'm looking for a cross-platform database engine that can handle databases up hundreds of millions of records without severe degradation in query performance. It needs to have a C or C++ API which will allow easy, fast construction of records and parsing returned data. Highly discouraged are products where data has to be translated to a...

How does memchr() work under the hood?

Background: I'm trying to create a pure D language implementation of functionality that's roughly equivalent to C's memchr but uses arrays and indices instead of pointers. The reason is so that std.string will work with compile time function evaluation. For those of you unfamiliar w/ D, functions can be evaluated at compile time if ce...

Windows System Idle Processes interfering with performance measurement

I am doing some performance measurement of my code on a Windows box and I am finding that I am getting dramatically different results between measurements. A quick bit of ad hoc exploration during a slow one shows in the task manager System Idle Processes taking up almost 100% CPU. Does anyone know what System Idle Processes actually m...

IronPython performance

I'm considering embedding IronPython as a scripting language for an application that I'm writing. So to try it out, I downloaded IronPython 2.0 and fired up the interactive interpreter. Just starting the thing up takes about 5 seconds on my Intel Quad Core with 6 Gigs of memory. I can hardly imagine how much of a delay this would be f...

Do Strongly Typed Datasets improve performance?

Where I work we're finally coming around to the idea of using strongly typed datasets to encapsulate some of our queries to sqlserver. One of the idea's I've been touting is the strength of the strongly typed column's, mainly for not needing to cast any data. Am I wrong in thinking that strongly-typed-datasets would improve performance ...

Do database views affect query performance?

Are database views only a means to simplify the access of data or does it provide performance benefits when accessing the views as opposed to just running the query which the view is based on? I suspect views are functionally equivalent to just the adding the stored view query to each query on the view data, is this correct or are there ...

what could be the effect on performance moving from virtual VMware to Physical servers?

I was wondering what could be the effect and possible advantage/disadvantage of replacing the Virtual VMWare with physical servers on performance of a web application ...

Fastest XML parser for small, simple documents in Java

I have to objectify very simple and small XML documents (less than 1k, and it's almost SGML: no namespaces, plain UTF-8, you name it...), read from a stream, in Java. I am using JAXP to process the data from my stream into a Document object. I have tried Xerces, it's way too big and slow... I am using Dom4j, but I am still spending way ...

Using Msql views in a Ruby on Rails app to improve performances

I'm having some performances issues in a rails project (running on rails 2.0.5), for example in my user administration pages. my user model has many relations (details, addresses, roles...) who get loaded with eager loading. That creates really huge SQL queries, for some cases, it takes almost a minute to load 30 users. On the other han...

Huge collections in Python

Basically I am storing millions of vector3 values in a list. But right now the vector3s are defined like so: [5,6,7] which I believe is a list. The values will not be modified nor I need any vector3 functionality. Is this the most performant way to do this? ...

What are the performance implications of marking methods / properties as virtual?

Question is as stated in the title: What are the performance implications of marking methods / properties as virtual? Note - I'm assuming the virtual methods will not be overloaded in the common case; I'll usually be working with the base class here. ...

How can I trim log files using Perl?

I have recently come up with a situation where I need to trim some rather large log files once they grow beyond a certain size. Everything but the last 1000 lines in each file is disposed of, the job is run every half hour by cron. My solution was to simply run through the list of files, check size and trim if necessary. for $file (@fil...