Hi,
We're in the throws of redesigning a screen from "old style" edit and submit, to AJAXy style with auto saving every few seconds.
The result will be way more, but way smaller server/db round trips. For example as a user edits a textarea field, we'll autosave their changes every 60 seconds via AJAX. Currently they would update one or...
I recently moved a bunch of tables from an existing database into a new database due to the database getting rather large. After doing so I noticed a dramatic decrease in performance of my queries when running against the new database.
The process I took to recreate the new database is this:
Generate Table CREATE scripts using sql ser...
Hi,
I was wondering which implementation would have better performance:
I need to clear all items out of a stack except the first 10 at the head.
These 10 must then be placed into the stack in their orginal order.
I thought of 2 approaches
the first:
FilterRecord[] records = new FilterRecord[10];
for (int i = 0; i < record...
What would be the fastest way to add a new column in a large mysql table ?
Alter table add column creates a copy of the full table, and then replaces the old one with the new create table. While this process is running, the original table is readable, but all inserts and updates are stalled.
On large tables, the copy can take a long t...
I have a pretty large table: 20+ million rows and I need to update about 5% of that - or 1 million rows.
Unfortunately, I am updating the (int) column that is being used as the clustered index.
My question is:
What is the fastest way to update these rows?
I have tried updating the rows directly:
update t1
set t1.groupId = t2.groupId...
I own a legacy python application written as CGI. Until now this works OK, but the number of concurrent users will increment largely in the very near future.
Here on SO I read: "CGI is great for low-traffic websites, but it has some performance problems for anything else". I know it would have been better to start in another way, but CGI...
Hey!
I am trying to find the fastest way to insert data into a table (data from a select)
I always clear the table:
TRUNCATE TABLE table;
Then I do this to insert the data:
INSERT INTO table(id,total) (SELECT id, COUNT(id) AS Total FROM table2 GROUP BY id);
Someone told me I shouldn't do this.
He said this would be much faster:
C...
What is the fastest way of checking the condition
l + 1 < r
for int l,r in Java?
l and r are not constant and I know that l <= r. The comparison is a stopping condition for a while loop in a binary search implementation. I am of course benchmarking my code, both in a separate test (searching a large array) and in the code which uses ...
I develop a 2D shooter game with lots of objects and aggressive scrolling.
QUESTION: which way is better?
CHOICE 1 - use native Flash rendering:
derive game objects from Bitmap, use existing x, y, width, height, bitmapData
add all objects as children UIComponent.addChild(...) to sccreen
clip visible area using "scrollRect"
CHOICE 2...
I'm looking for a white paper or online book/tutorial about coding efficiently in Java. I've read the white paper from Sun on Performance Tuning (which was mostly about JVM settings) and the one about Garbage Collection management. I'm looking for a paper that focuses more at the code level - which types of constructs are more efficient ...
Hello,
We have noticed that our queries are running slower on databases that had big chunks of data added (bulk insert) when compared with databases that had the data added on record per record basis, but with similar amounts of data.
We use Sql 2005 Express and we tried reindexing all indexes without any better results.
Do you know of s...
I'm having performance issues with Linq2Sql compared to raw ADO.NET which has led me down the path of compiled queries. I have got this far so far
public static readonly Func<MyDataContext, WebServices.Search.Parameters, IQueryable<image>>
Compiled_SelectImagesLinq =
CompiledQuery.Compile<MyDataContext, WebServices.Search.P...
Our current solutions/projects have several classes combined into one file, I'm told this was done due to the slow compile times in VS.
Is this a confirmed problem and solution?
Can we break these apart now that we are using VS2008 Team system? Has anyone else separated the classes into different files and still had good performance?
...
Is there any difference (performance, best-practice, etc...) between putting a condition in the JOIN clause vs. the WHERE clause?
For example...
-- Condition in JOIN
SELECT *
FROM dbo.Customers AS CUS
INNER JOIN dbo.Orders AS ORD
ON CUS.CustomerID = ORD.CustomerID
AND CUS.FirstName = 'John'
-- Condition in WHERE
SELECT *
FROM dbo.Cus...
I'm Working with a new Oracle DB, with one table having the following indexes:
Index 1: ColA, ColB
Index 2: ColA
Is the second index redundant, and Will this have a negative impact on performance?
...
Hi, in the beggining i build my site - bemcapaz.net - on Wordpress. But after having to hack the core and build lots of stuff trought direct programming I decided to move on to Drupal.
Drupal besides being a CMS focused more on community websites is great for doing anything you can imagine in a really simple way, even a Blog wich was wh...
I was trying to figure out if a for loop was faster than a foreach loop and was using the System.Diagnostics classes to time the task. While running the test I noticed that which ever loop I put first always executes slower then the last one. Can someone please tell me why this is happening? My code is below:
using System;
using System....
I've inherited a piece of code that makes intensive use of String -> byte[] conversions and vice versa for some homegrown serialisation code. Essentially the Java objects know how to convert their constituent parts into Strings which then get converted into a byte[]. Said byte array is then passed through JNI into C++ code that reconstit...
I've creating a Java Swing application and I realized that I have many many components on a form.
It's not that my interface is cluttered, but nevertheless the total amount can be quite high (hundreds) because the user can enable additional parts of the interface and there have to be list-like repeating panels on the form.
Additionally...
Hi,
I need to dynamically set values on a bunch or properties on an object , call it a transmission object. There will be a fair number of these transmission objects that will be created and have its properties set in a short space of time.I want to avoid the use of reflection, are there alternativ? If so are there sample implementation...