In a game that I am writing, I use a 2D vector class which I have written to handle the speeds of the objects. This is called a large number of times every frame as there are a lot of objects on the screen, so any increase I can make in its speed will be useful.
It is pretty simple, consisting mostly of wrappers to the related math func...
Hi,
I am getting a SQLException when I try to run the query in Informix DB using JDBC. The query is huge in size:
select * table_name where tableid in (....)
I get an exception because the 'in' part contain more than 5000 values and because of the length. Is there a way to avoid this or should I break it down and run two queries?
...
Although in name this question is similar to this and this, it's not.
I'm currently developing a library that may require some custom configuration depending on the user's desire.
I have created a custom configuration section, and everything works just fine.
However, when I was debugging I noticed that the configuration section const...
I am connecting oracle db thru java program. The problem is i am getting Outofmemeory exception because the sql is returning 3 million records. I cannot increase the JVM heapsize for some reason.
What is the best solution to solve this?
Is the only option is to run the sql with LIMIT?
...
Summary: I collect the doc ids of all hits for a given search by using a custom Collector (it populates a BitSet with the ids). The searching and getting doc ids are quite fast according to my needs but when it comes to actually fetching the documents from disk, things get very slow. Is there a way to optimize Lucene for faster document ...
I'm in the process of optimizing a high traffic site. The site I am working on has many widgets - say 20 or so and only 7 are loaded by default. I was thinking of separating my css and image sprites for faster load times for the default widgets.
For the rest of the non-default widgets, I was thinking of having a separate css file a...
If i were to organise data on tourism and hotel for the continent of Australia and south
America can you let me know a best way to do it. Like if i organise the tables thus:
continents
countries
states
zipcodes
cities
destinations
hotels
lnkhotelszipcodes (in case a hotel exists in multiple places)
lnkhotelscities
It will be search ...
CREATE TABLE `names` ( `name` varchar(20) );
Assume the "names" table contains all 40 million first names of everyone living in California (for example).
SELECT count(*) as count, name FROM names GROUP BY name ORDER BY name;
How can I optimize this query?
Expected Result:
count | name
9999 | joe
9995 | mike
9990 | kate
...
2 | kal...
Hai guys,
I want compress my images without changing the quality... Because my web application uses lots of images and when i inspected with firebug i found images size where huge...
Are there any good image optimizer?
I know there is SmushIt from yahoo... Any other useful image optimizers?
...
My previous question:
http://stackoverflow.com/questions/2112567/date-of-max-id-sql-oracle-optimization
In my previous question, I was finding different ways of finding the date of the record with the highest id number. Below are several of the offered solutions, and their 'cost' as calculated by explain plan.
select date from table ...
What are the pro/cons of using the params keyword vs. a List as input to some c# function?
Mainly what are the performance considerations and other trade offs.
...
I'm interested in any comparisons between GCC and Greenhills C compiler with regard to memory footprint of generated code specifically on ARM platforms.
Are there any benchmarks or comparisons for these compilers? Has anyone had any experience here that they'd like to share?
...
Hi,
Typically, the databases are designed as below to allow multiple types for an entity.
Entity Name
Type
Additional info
Entity name can be something like account number and type could be like savings,current etc in a bank database for example.
Mostly, type will be some kind of string. There could be additional information associat...
Ahhhw, every time is so frustrating..
We have a dedicated server in our hosting company, and everytime i have to write down a new app (or an add to an pre-existing app), i use to 'lose' some time to optimize the code for many behaviors (reducing the db query, optimizing the db structure, reducing the bandwith, etc..) depending on what t...
While i like the intellectual challenge coming from the design of multicore systems i realize that most of them were just unnecessary premature optimization.
But on the other hand usually all systems have some performance need and refactoring it later into multithreading safe operations is hard or even just economically not possible bec...
I have some code I use to transfer a table1 values to another table2, they are sitting in different database.
It's slow when I have 100.000 records. It takes forever to finish, 10+ minutes.
(Windows Mobile smartphone)
What can I do?
cmd.CommandText = "insert into " + TableName + " select * from sync2." + TableName+"";
cmd.Execute...
I was hoping I could get some help optimizing this query for a rails site:
Vacation
has_many :departures
has_many :photos
Departure
belongs_to :vacation
Photo
belongs_to :vacation
I need to find a list of vacations ordered and displayed by departure. So if a vacation has two departures, it should show up in the list twice (once for...
I have a small list of keywords. What I'd really like to do is akin to:
case MyKeyword of
'CHIL': (code for CHIL);
'HUSB': (code for HUSB);
'WIFE': (code for WIFE);
'SEX': (code for SEX);
else (code for everything else);
end;
Unfortunately the CASE statement can't be used like that for strings.
I could use the straight IF ...
After my last question, I want to understand when an optimization is really worth the time a developer spends on it.
Is it worth spending 4 hours to have queries that are 20% quicker? Yes, no, maybe, yes if...?
Is 'wasting' 7 hours to switch a task to another language to save about 40% of the CPU usage 'worth it'?
My normal iteration ...
Starting with Win7/Server2008R2 the GetNumaProximityNode(Ex) function is available. It should help retrieve the distance between NUMA nodes, but I can't understand from the documentation (http://msdn.microsoft.com/en-us/library/ms683206(VS.85).aspx) how it's supposed to work. It says that you give it a distance, and it returns the corres...