performance-tuning

SQL server virtual memory usage and performance

Hello, I have a very large DB used mostly for analytics. The performance overall is very sluggish. I just noticed that when running the query below, the amount of virtual memory used greatly exceeds the amount of physical memory available. Currently, physical memory is 10GB (10238k bytes) whereas the virtual memory returns significantly...

MySQL Normalization stored procedure performance

I've written a stored procedure in MySQL to take values currently in a table and to "Normalize" them. This means that for each value passed to the stored procedure, it checks whether the value is already in the table. If it is, then it stores the id of that row in a variable. If the value is not in the table, it stores the newly inserted...

Performance profiler for a java application

I need to optimize a java application. It makes some 3rd party calls. I need some good tool to accurately measure the time taken by individual api calls. To give an idea of complexity- the application takes a data source file containing 10 lakh rows, and it takes around one hour to complete the processing. As a part of processing , it ma...

Set of Tools to optimize the performance in general of SQL Server

Hi, I know there are things out there to help to optimize queries, ect... but is there anything else, something like a full package that can scan your database and highlight all the performance issues, naming conventions, tables not properly normalized, etc? I know this is the job of a DBA and if the DBA is good, he shouldn't need a t...

JVM tuning on Amazon EC2

We will be deploying a production application to Amazon EC2 very shortly. Initially, we'll just be using a "small" instance, but have plans to scale up not long afterwards. My question is, has any investigation been done on JVM tuning for the EC2 environment? Are there any specific changes that we should make to our JVM parameters to ...

Loading animation Memory leak

Hi, I have written network class that is managing all network calls for my application. There are two methods showLoadingAnimationView and hideLoadingAnimationView that will show UIActivityIndicatorView in a view over my current viewcontroller with fade background. I am getting memory leaks somewhere on these two methods. Here is the cod...

Query Execution time in Management Studio & profiler. What does it measure?

I have my production SQL Server in a remote data center(and the web servers are located in the same data center). During development we observed that one particular view takes a long time to execute (about 60-80 secs) in our local development SQL Server, and we were OK with it.It was promoted to production and when I run the same query o...

How can I correlate SQL Server performance metrics to the stored procedures that are causing problems

the situation is that there are certain stored procedures and/or ad-hoc SQL that is causing our CPU to spike from 30 to 80% and dropping all our indexes out of memory, I'm wondering if there is a well established way to correlate the performance spikes (CPU, Disk Read, etc.) to particular instances of SP running.. ...

cakePHP performance

hello friends, when i am hosting cakePHP and database is in different servers it takes too much time to respond but when both are in the same server itz performance is good is there any way to tune performance of cakePHP keeping database in different server the performance of database server is good i already tested another applicatio...

Performance issues with transpose and insert large, variable column data files into SQL Server

I'm currently working on a project where we have a large data warehouse which imports several GB of data on a daily basis from a number of different sources. We have a lot of files with different formats and structures all being imported into a couple of base tables which we then transpose/pivot through stored procs. This part works fi...

MySQL - How can this query be optimised?

The following query works, but its very slow for 10 records (2 seconds). The profiling says its creating a tmp table, but I'm not sure why. Basically, I'm joining the current user, to the acl groups, to get all groups they are in, then joining the groups to the companies, to get all companies they are in, then joining the companies to t...

Why doesn't PostgreSQL performance get back to its maximum after a VACUUM FULL?

I have a table with a few million tuples. I perform updates in most of them. The first update takes about a minute. The second, takes two minutes. The third update takes four minutes. After that, I execute a VACUUM FULL. Then, I execute the update again, which takes two minutes. If I dump the database and recreate it, the first upda...

Oracle explain plan estimates incorrect cardinality for an index range scan

I have an Oracle 10.2.0.3 database, and a query like this: select count(a.id) from LARGE_PARTITIONED_TABLE a join SMALL_NONPARTITIONED_TABLE b on a.key1 = b.key1 and a.key2 = b.key2 where b.id = 1000 Table LARGE_PARTITIONED_TABLE (a) has about 5 million rows, and is partitioned by a column not present in the query. Table SMALL_NONPAR...

Execution Cost vs execution time in Oracle

I have a report query that joins 19 tables in DW. I know our DW schema design is not good. This query is running every night and gathering yesterday's activity. Our system went live in 06/2008, so the data volume for 1 day is a small portion compared to the entire data volume. The query execution time was generally 5~10 minutes and the ...

How to debug a database query for performance

I am absolutely new in databases and SQL queries. Q1. What are the common problems one generally face in database queries? Probably extremely large queries, performance issues, timeout and connectivity errors, import export and restoration errors Q2. What approach and tools one should be aware of while debugging a sequel ...

A Faster way of Directory walking instead of os.listdir ?

Hello SO! I am trying to improve performance of elfinder , an ajax based file manager(elRTE.ru) . It uses os.listdir in a recurisve to walk through all directories recursively and having a performance hit (like listing a dir with 3000 + files takes 7 seconds ) .. I am trying to improve performance for it here is it's walking function:...

Tools for optimizing scalability of an Hadoop application?

I'm working with a team of mine on a small application that takes a lot of input (logfiles of a day) and produces useful output after several (now 4, in the future perhaps 10) map-reduce steps (Hadoop & Java). Now I've done a partial POC of this app and ran it on 4 old desktops (my Hadoop test cluster). What I've noticed is that if you ...

PostgreSQL CLUSTER on multi-column index

Say I have an index on (a, b, c) and I perform CLUSTER on that index. How exactly will the data be stored? I would assume it's something like this (just guessing): first sort by a, then by b, then by c. For example: (a, b, c) --------- (1, 1, 1) (1, 1, 2) (1, 2, 5) (2, 1, 4) (3, 1, 1) That means, if I want to have it ordered by b firs...

What index would speed up my XQuery in X-Hive / Documentum xDB?

I have approx 2500 documents in my test database and searching the xpath /path/to/@attribute takes approximately 2.4 seconds. Doing distinct-values(/path/to/@attribute) takes 3.0 seconds. I've been able to speed up queries on /path/to[@attribute='value'] to hundreds or tens of milliseconds by adding a Path value index on /path/to[@attr...

How can i protect my server from multiple queries on port 80?

Hello guys, i have a very simple server running WAMP on a windows machine, with a php code who is a simple API for my clients that returns an XML. The things is that the hardware is very modest, and if a user calls the link to the API and hits F5 many times (calls the link repeatedly) the server performance goes down a little (response t...