![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hell guys, I have a logserver which need access the database to show me informations on the screen. The problem is that it is slow because the table is very big (around 25.000.000 of rows). When I do a search by software it takes a long time to return me the result (around 3 or 5 minutes). The Mysql is in a virtual server and the Virtual Machine and has 6GB of ram, /var/lib/mysql is in a different partition of S.O (with ext3) and the disks of my storage are 15k. I don't have raid in this server. I would like to know how I can improve the time of querys. My my.conf is this: snip Renato |
#3
| |||
| |||
|
|
Hell guys, I have a logserver which need access the database to show me informations on the screen. The problem is that it is slow because the table is very big (around 25.000.000 of rows). When I do a search by software it takes a long time to return me the result (around 3 or 5 minutes). The Mysql is in a virtual server and the Virtual Machine and has 6GB of ram, /var/lib/mysql is in a different partition of S.O (with ext3) and the disks of my storage are 15k. I don't have raid in this server. I would like to know how I can improve the time of querys. My my.conf is this: |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
In article 2a6280a6-e50c-4893-aedf-e0d7caf46... (AT) f11g2000yql (DOT) googlegroups.com>, *renator <renato.rudni... (AT) gmail (DOT) com> wrote: Hell guys, I have a logserver which need access the database to show me informations on the screen. The problem is that it is slow because the table is very big (around 25.000.000 of rows). When I do a search by software it takes a long time to return me the result (around 3 or 5 minutes). The Mysql is in a virtual server and the Virtual Machine and has 6GB of ram, /var/lib/mysql is in a different partition of S.O (with ext3) and the disks of my storage are 15k. I don't have raid in this server. I would like to know how I can improve the time of querys. My my.conf is this: [servers config removed] How long it takes to perform a query depends primarily on what's being searched for. *If you're not a database person, this may not help, but you need to have one of the fields being searched for as a key field. This is in the database schema definition for the table, not the server's config file. *If a field isn't a key field, then the database has to do a linear search on every record to see if it it matches the criteria. You can find out if it's doing this by asking MySQL to "EXPLAIN" the query. *Again, if you're not a database person or can't modify the database schema or change the software doing the query, you're done, essentially. -- DeeDee, don't press that button! *DeeDee! *NO! *Dee... [I filter all Goggle Groups posts, so any reply may be automatically ignored] |
#6
| |||
| |||
|
|
On 29 dez, 14:43, Michael Vilain<vil... (AT) NOspamcop (DOT) net> wrote: In article 2a6280a6-e50c-4893-aedf-e0d7caf46... (AT) f11g2000yql (DOT) googlegroups.com>, renator<renato.rudni... (AT) gmail (DOT) com> wrote: Hell guys, I have a logserver which need access the database to show me informations on the screen. The problem is that it is slow because the table is very big (around 25.000.000 of rows). When I do a search by software it takes a long time to return me the result (around 3 or 5 minutes). The Mysql is in a virtual server and the Virtual Machine and has 6GB of ram, /var/lib/mysql is in a different partition of S.O (with ext3) and the disks of my storage are 15k. I don't have raid in this server. I would like to know how I can improve the time of querys. My my.conf is this: [servers config removed] How long it takes to perform a query depends primarily on what's being searched for. If you're not a database person, this may not help, but you need to have one of the fields being searched for as a key field. This is in the database schema definition for the table, not the server's config file. If a field isn't a key field, then the database has to do a linear search on every record to see if it it matches the criteria. You can find out if it's doing this by asking MySQL to "EXPLAIN" the query. Again, if you're not a database person or can't modify the database schema or change the software doing the query, you're done, essentially. -- DeeDee, don't press that button! DeeDee! NO! Dee... [I filter all Goggle Groups posts, so any reply may be automatically ignored] Haaa, all index of all tables this database are the Primary Keys. Doesn't have other index, just the Primary Keys. []'s Renato |
#7
| |||
| |||
|
|
On 12/30/2011 10:47 AM, renator wrote: On 29 dez, 14:43, Michael Vilain<vil... (AT) NOspamcop (DOT) net> *wrote: In article 2a6280a6-e50c-4893-aedf-e0d7caf46... (AT) f11g2000yql (DOT) googlegroups.com>, * renator<renato.rudni... (AT) gmail (DOT) com> *wrote: Hell guys, I have a logserver which need access the database to show me informations on the screen. The problem is that it is slow because the table is very big (around 25.000.000 of rows). When I do a search by software it takes a long time to return me the result (around 3 or 5 minutes). The Mysql is in a virtual server and the Virtual Machine and has 6GB of ram, /var/lib/mysql is in a different partition of S.O (with ext3) and the disks of my storage are 15k. I don't have raid in this server. I would like to know how I can improve the time of querys. My my.conf is this: [servers config removed] How long it takes to perform a query depends primarily on what's being searched for. *If you're not a database person, this may not help, but you need to have one of the fields being searched for as a key field. This is in the database schema definition for the table, not the server's config file. *If a field isn't a key field, then the database has to do a linear search on every record to see if it it matches the criteria. You can find out if it's doing this by asking MySQL to "EXPLAIN" the query. *Again, if you're not a database person or can't modify the database schema or change the software doing the query, you're done, essentially. -- DeeDee, don't press that button! *DeeDee! *NO! *Dee... [I filter all Goggle Groups posts, so any reply may be automatically ignored] Haaa, all index of all tables this database are the Primary Keys. Doesn't have other index, just the Primary Keys. []'s Renato Once again - did you EXPLAIN your query? *What is the query and what is the output from EXPLAIN? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex (AT) attglobal (DOT) net ================== |
#8
| |||
| |||
|
|
On 30 dez, 13:49, Jerry Stuckle<jstucklex (AT) attglobal (DOT) net> wrote: On 12/30/2011 10:47 AM, renator wrote: On 29 dez, 14:43, Michael Vilain<vil... (AT) NOspamcop (DOT) net> wrote: In article 2a6280a6-e50c-4893-aedf-e0d7caf46... (AT) f11g2000yql (DOT) googlegroups.com>, renator<renato.rudni... (AT) gmail (DOT) com> wrote: Hell guys, I have a logserver which need access the database to show me informations on the screen. The problem is that it is slow because the table is very big (around 25.000.000 of rows). When I do a search by software it takes a long time to return me the result (around 3 or 5 minutes). The Mysql is in a virtual server and the Virtual Machine and has 6GB of ram, /var/lib/mysql is in a different partition of S.O (with ext3) and the disks of my storage are 15k. I don't have raid in this server. I would like to know how I can improve the time of querys. My my.conf is this: [servers config removed] How long it takes to perform a query depends primarily on what's being searched for. If you're not a database person, this may not help, but you need to have one of the fields being searched for as a key field. This is in the database schema definition for the table, not the server's config file. If a field isn't a key field, then the database has to do a linear search on every record to see if it it matches the criteria. You can find out if it's doing this by asking MySQL to "EXPLAIN" the query. Again, if you're not a database person or can't modify the database schema or change the software doing the query, you're done, essentially. -- DeeDee, don't press that button! DeeDee! NO! Dee... [I filter all Goggle Groups posts, so any reply may be automatically ignored] Haaa, all index of all tables this database are the Primary Keys. Doesn't have other index, just the Primary Keys. []'s Renato Once again - did you EXPLAIN your query? What is the query and what is the output from EXPLAIN? Hi Jerry, I didn't find the query at the moment of the select happening. This software wich I using wasn't writed by me or my company. []'s Renato |
#9
| |||
| |||
|
|
Well, I look the behavior on mysqld.log and I get this 2 results: |
#10
| |||
| |||
|
|
renator <renato.rudnicki (AT) gmail (DOT) com> wrote: Well, I look the behavior on mysqld.log and I get this 2 results: [general query log snipped] This is nothing that you normally want to expose. Much more interesting would be the slow query log because it contains (by definition!) only the slow queries along with information about execution time, number of scanned rows etc. If you find your problem query there, run it through EXPLAIN and show us the result. Also add SHOW CREATE TABLE and SHOW INDEX FROM TABLE for all tables involved by the query. XL |
![]() |
| Thread Tools | |
| Display Modes | |
| |