1
vote
3answers
107 views

MySQL high cpu load slow quries being logged need help to understand

I'm trying to troubleshoot a high load problem on a server, Today for some reason MySQL is taking up excessive CPU time. I have enabled slow-queries and found this query and others similar. The ...
1
vote
1answer
49 views

SQL Performance - Convert parameter or column type

I was asked this on an interview, and would like some feedback... I have a stored procedure that takes in a varchar parameter IsActive that is either a "YES" or "NO" string. The stored procedure ...
0
votes
3answers
24 views

Apache / PHP Begins to Deny SQL Requests after about 2000

We have a web page on our server that we use to run administrative scripts. For example, we might run the script "unenrolStudents()" which runs 5,000 SQL SET commands one after another and sets 5000 ...
0
votes
2answers
876 views

SQL query to Automatically Export to file and FTP?

I am wondering if there is such a way to automatically run SQL queries and export to file (example: csv file) and then FTP to desired location? It seems simple and would need something like this as it ...
1
vote
0answers
181 views

How to generate test data from an sql query and a result set?

I am using an oracle database and want to generate test data from a live database, but I do not want to copy the whole database content. Given a database DB(S, D) consisting of the database schema S ...
0
votes
1answer
5k views

query from sql table via powershell

I've created a SQL Server database with a simple table on my local machine. I try to query some information from this table. Here is my code: $connection= New-Object ...
0
votes
1answer
214 views

A pseudo-Sql server to intercept and see all MySQL queries

I would like to setup a "pseudo-server" to intercept all the SQL queries made by my local application. The reason for that is that I can't administer the Mysql server, and it's difficult for me to ...
0
votes
1answer
245 views

MS SQL Query Count & Sum

select count(distinct consumerno), sum (case when ccon like '%D%' then 1 else 0 end) as Domestic, sum (case when ccon like '%B%' then 1 else 0 end) as Business from consumer left join contract on ...
1
vote
4answers
395 views

why this statement in oracle perform much slower then ms sql

I tried to run a simple test to see how the speed fair between oracle and Ms Sql as follow: populate two tables with 2 million records, cross join them, filter by a range, and do a sum. Both table ...
0
votes
1answer
339 views

MySQL 5.1 Slow SHOW DATABASES (phpMyAdmin)

We have about 200 databases and since upgrading from 4.1 to 5.1 we've noticed that PHPMyAdmin takes a while to load the left navigation sometimes. Is there anything we can do to make this quicker? ...
0
votes
2answers
53 views

Show any null value?

is there a SQL statement that would show any null value in any record? For example if I had a table Alpha with Column A, B, and C where C was null in one record, and B was null in another, and A in ...
0
votes
5answers
1k views

What is faster for reading: SQL CE or file on the disk?

On my server side I need to store user data somehow. Some time ago I used to use INI files for writing and reading those values. Even with tousands of files it was incredibly fast (ms), maybe due to ...
0
votes
1answer
388 views

Access or SQL query to list most recent AutoNumber within a specific Range

I am looking to write a query where it shows me the last 50 of the highest ids, without knowing the most recent id #. The id is an autogenerated primary key. Any help would be appreciated. Maybe I ...
4
votes
3answers
4k views

Importing a large SQL script into SQL Server?

I'm trying to move a database from our production server to our test server. I've used Microsoft's Database Publishing Wizard to create a script containing the schema and data for the production ...