Re: Question regarding creating a query

2013-07-30 Thread hsv
2013/07/30 14:12 -0400, Sukhjinder K. Narula I have several databases (all with same structure), which I to query. For instansce: db1, db2, db3 - all have table tb1 with field a, b and table tb2 with fields flag1, flag2 So I want to query and get field a from tb for all db's. One way to

RE: Question regarding creating a query

2013-07-30 Thread Rick James
> I have to update the query every time. Therein lies the difficulty with the schema design. You could write a stored procedure to locate all the tables (use information_schema.TABLES, etc) and build the UNION, and finally execute it. The SP would have something very remotely like the foreach y

RE: hypothetical question about data storage

2013-07-30 Thread Johan De Meersman
Rick James wrote: > >When writing a random block, RAID-5 does not need to touch all the >drives, only the one with parity. Suitable XORs will update it >correctly. So, a write hits 2 drives, whether you have RAID-5 or -10. Only if the other blocks happen to be in the cache, otherwise a read is

Question regarding creating a query

2013-07-30 Thread Sukhjinder K. Narula
Hello, I have a question regarding creating a query as follows: I have several databases (all with same structure), which I to query. For instansce: db1, db2, db3 - all have table tb1 with field a, b and table tb2 with fields flag1, flag2 So I want to query and get field a from tb for all db's.

Question about Server Debug Info

2013-07-30 Thread Wayne Leutwyler
Hello List, On two different occasions and on two different servers I have found server debug information written out to the mysqld.log file. Now I know that by issuing the kill -1 mysql-pid will write that information to the mysqld.log file, and by using mysqladmin debug will also write debug

RE: Performance Improvements with VIEW

2013-07-30 Thread Rick James
VIEWs are not well optimized. Avoid them. The SlowLog will probably point to the worst query; we can help you improve it (SHOW CREATE TABLE; SHOW TABLE STATUS; EXPLAIN) Only minutes to go through 10 million records? Sounds good. It takes time to shovel through that much stuff. "Sending data

Re: Performance Improvements with VIEW

2013-07-30 Thread Bruce Ferrell
On 07/30/2013 04:13 AM, Manivannan S. wrote: Hi, I've a table with 10 Million records in MySQL with INNODB engine. Using this table I am doing some calculations in STORED PROCEDURE and getting the results. In Stored Procedure I used the base table and trying to process all the records in the

Re: Performance Improvements with VIEW

2013-07-30 Thread Andrew Moore
I think you're reducing the amount of rows referenced throughout the proc using the view. This might be where you're seeing a performance difference. If you create an innodb table where the structure and row count match the view maybe you'll see another difference? I'll wait for Rick James' input b

Performance Improvements with VIEW

2013-07-30 Thread Manivannan S.
Hi, I've a table with 10 Million records in MySQL with INNODB engine. Using this table I am doing some calculations in STORED PROCEDURE and getting the results. In Stored Procedure I used the base table and trying to process all the records in the table. But it's taking more than 15 Minutes to