Re: Table design help

2010-09-09 Thread mos
At 04:23 PM 9/9/2010, Tompkins Neil wrote: Hi all, Needing some advice on my tables design. Basically I am designing a soccer application, and have a table which contains player_bids (the values of which a player costs to be transferred between clubs). Can someone please offer some input on th

background IO threads for MyISAM?

2010-09-09 Thread Jacek Becla
Hello, Does anyone know if MyISAM supports background IO threads, or it is available only for InnoDB? Thanks, Jacek -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Trying to remove a filesort.

2010-09-09 Thread Phil
Thanks! I did not know that. Just tried it and indeed the Created_tmp_disk_tables did not increase, just the Created_tmp_tables increased by +1. Still not perfect, but it's better than I thought and at least in memory. And for the previous mails, I'm not sure why I ever had the sort_buffer_size t

RE: Trying to remove a filesort.

2010-09-09 Thread Travis Ard
When the explain output says "Using filesort", it doesn't necessarily mean it is sorting on disk. It could still be sorting in memory and, thus, be reasonably fast. You might check the value of Created_tmp_disk_tables before and after your query to see for sure. -Travis -Original Message---

Re: hard disk crash: how to discover the db?

2010-09-09 Thread George Larson
We do nightly backups at work just by taring the mysql directory. In my environment, that is /var/lib/mysql. Like this: service mysql stop cd /var/lib/mysql rm -rf * tar zxvf file.tar rm -rf ib_logfile* chown -R mysql.mysql service mysql start Something similar might work for you. Somebody wit

Table design help

2010-09-09 Thread Tompkins Neil
Hi all, Needing some advice on my tables design. Basically I am designing a soccer application, and have a table which contains player_bids (the values of which a player costs to be transferred between clubs). Can someone please offer some input on the best way in which I should design the finan

Re: hard disk crash: how to discover the db?

2010-09-09 Thread Uwe Brauer
andrew.2.mo...@nokia.com wrote: Try using the failed hdd as a slave in a Linux machine. You might find that the hdd won't boot to OS but may have enough in it to access the file system. I have done that already and I have access. But I don't know how to extract the db (via dump) since the

Re: hard disk crash: how to discover the db?

2010-09-09 Thread andrew.2.moore
Try using the failed hdd as a slave in a Linux machine. You might find that the hdd won't boot to OS but may have enough in it to access the file system. - Reply message - From: "ext Uwe Brauer" Date: Thu, Sep 9, 2010 21:31 Subject: hard disk crash: how to discover the db? To: "mysql@lis

hard disk crash: how to discover the db?

2010-09-09 Thread Uwe Brauer
Hello This is a real nightmare. A Mac crashed, the hard disk could be saved. Right now it can't be booted. But I don't know precisely the version of the OS (most likely Mac X 10.4), nor the version of mysql (most likely 5.3.x) and to make things worse I did not generate a dump. So is there any c

Re: Trying to remove a filesort.

2010-09-09 Thread Michael Dykman
You make an excellent point. If there are a lot of connections to that server, many sort buffers may be in use and can squeeze ram out of the rest of the system. 2M is a pretty good choice. - md On Thu, Sep 9, 2010 at 4:08 PM, Ananda Kumar wrote: > Its not advisiable...as this size will be al

Re: Trying to remove a filesort.

2010-09-09 Thread Ananda Kumar
Its not advisiable...as this size will be allocated to all the session and cause system running out of memory. It should be set at session and in my.cnf it should be around 2 MB. Please correct if i am wrong. regards anandkl On Fri, Sep 10, 2010 at 1:26 AM, Phil wrote: > It's in my.cnf. There

Re: Trying to remove a filesort.

2010-09-09 Thread Phil
It's in my.cnf. There is 12Gb in the database server and I watch it fairly carefully and have not gone into swap yet in the past few years. On Thu, Sep 9, 2010 at 3:43 PM, Ananda Kumar wrote: > have u set sort_buffer_size at session level or in my.cnf. > Setting high value in my.cnf, will cause

Re: Trying to remove a filesort.

2010-09-09 Thread Ananda Kumar
have u set sort_buffer_size at session level or in my.cnf. Setting high value in my.cnf, will cause mysql to run out off MEMORY and paging will happen regards anandkl On Fri, Sep 10, 2010 at 1:10 AM, Phil wrote: > Even prior to the group by it's still not likely to ever be more than 200 > or >

Re: Trying to remove a filesort.

2010-09-09 Thread Phil
Even prior to the group by it's still not likely to ever be more than 200 or so maximum. I have the sort_buffer_size at 256Mb so I don't believe it's that either :( On Thu, Sep 9, 2010 at 3:16 PM, Michael Dykman wrote: > How many rows before the GROUP BY? Group by is, in effect a sorting > pro

Re: Trying to remove a filesort.

2010-09-09 Thread Michael Dykman
How many rows before the GROUP BY? Group by is, in effect a sorting process.. perhaps that contains enough data to justify going to disk. What is the value of the variable sort_buffer_size? show variables like '%sort%'; - md On Thu, Sep 9, 2010 at 3:04 PM, Phil wrote: > On average i

Re: Trying to remove a filesort.

2010-09-09 Thread Phil
On average it would be between 10 and 40, certainly no more than 100. On Thu, Sep 9, 2010 at 2:57 PM, Michael Dykman wrote: > The filesort is probably necessary because of the number of rows in > the result set to be ordered. How many rows do you get out of this > query? > > - michael dykman

Re: Trying to remove a filesort.

2010-09-09 Thread Michael Dykman
The filesort is probably necessary because of the number of rows in the result set to be ordered. How many rows do you get out of this query? - michael dykman On Thu, Sep 9, 2010 at 1:53 PM, Phil wrote: > I wonder if anyone could help with a query which I've been unable to prevent > from using

Trying to remove a filesort.

2010-09-09 Thread Phil
I wonder if anyone could help with a query which I've been unable to prevent from using a filesort. Might be something obvious I'm overlooking! I have a table which tracks milestones in distributed computing projects Create Table: CREATE TABLE `boinc_milestone` ( `proj` char(6) NOT NULL, `id`

RE: Query SUM help

2010-09-09 Thread Travis Ard
MySQL doesn't have the windowing functions that some other databases provide, but you can probably achieve the same effect with a couple user-defined variables: select teams_id as my_teams_id ,sum(rating) as total_team_rating from (select players.teams_id ,players.players_id

Re: Does putting a LIMIT on a DELETE clause make any difference?

2010-09-09 Thread Johan De Meersman
Correct. To verify this, simply create a select with the same structure as your delete - the execution plan will be similar. I do not believe limit will help you, however, as it is only applied after execution, when the full dataset is known. On Thu, Sep 9, 2010 at 8:06 AM, Ananda Kumar wrote:

Re: Replaying the mysqld.log file from production onto QA???

2010-09-09 Thread Nunzio Daveri
So.. I am trying to mimic replaying production like queries so joins, temp tables etc... are stuff I am trying to test as well. Just doing a dump and import is no more than export and importing, I also want to test selects, updates :-) Thanks for replying :-) Nunzio __

Re: Fwd: Query SUM help

2010-09-09 Thread Shawn Green (MySQL)
On 9/9/2010 3:57 AM, Tompkins Neil wrote: Any help would be really appreciated ? -- Forwarded message -- From: Tompkins Neil Date: Wed, Sep 8, 2010 at 5:30 PM Subject: Query SUM help To: "[MySQL]" Hi I've the following query : SELECT total_team_rating, my_teams_id FROM (S

Re: Query SUM help

2010-09-09 Thread Ananda Kumar
try using the RANK function... something like select * from table order by RANK desc limit 11.this will get u the top 11 rows. regards anandkl On Thu, Sep 9, 2010 at 1:55 PM, Tompkins Neil wrote: > Yes, but it doesn't work. Basically I want the SUM(players_master.rating) > only to SUM the

Re: Query SUM help

2010-09-09 Thread Tompkins Neil
Yes, but it doesn't work. Basically I want the SUM(players_master.rating) only to SUM the top 11 players from each team. Any suggestions ? Cheers Neil On Thu, Sep 9, 2010 at 9:17 AM, Ananda Kumar wrote: > did u try to use LIMIT after ORDER BY > > > On Thu, Sep 9, 2010 at 1:27 PM, Tompkins Ne

Re: Query SUM help

2010-09-09 Thread Ananda Kumar
did u try to use LIMIT after ORDER BY On Thu, Sep 9, 2010 at 1:27 PM, Tompkins Neil wrote: > Any help would be really appreciated ? > > > > -- Forwarded message -- > From: Tompkins Neil > Date: Wed, Sep 8, 2010 at 5:30 PM > Subject: Query SUM help > To: "[MySQL]" > > > Hi > > I

Fwd: Query SUM help

2010-09-09 Thread Tompkins Neil
Any help would be really appreciated ? -- Forwarded message -- From: Tompkins Neil Date: Wed, Sep 8, 2010 at 5:30 PM Subject: Query SUM help To: "[MySQL]" Hi I've the following query : SELECT total_team_rating, my_teams_id FROM (SELECT players.teams_id AS my_teams_id, SUM(p