How to avoid Using temporary; Using filesort

2009-01-14 Thread Johan Thorvaldsson
I have a query that runs very slow and using Using temporary; Using filesort. Is there a way to avoid them using current table structure? Goal with the query is to find ads (ad_id) that have tags (tag_id) connected to them, order by antal is used to get the most relevant first. ( the one that

Unused and empty tables - what impact on mysql

2009-01-14 Thread Brent Clark
Hiya I just inherited a project, and before I get started, Id like to do a little clean up. There a * load of unused and empty tables in the db. My question is, does this in any way affect the performance of mysql in anyway and if so how? Kind Regards Brent Clark -- MySQL General

Re: How to avoid Using temporary; Using filesort

2009-01-14 Thread Walter Heck
One optimization I see quickly is changing the left join to an inner join. You always look for records that exist in tag_ad_map (by checking for tm.is_active) so the left join is not necessary. That should at least speed this query up considerably. Walter Need MySQL advice? OlinData.com is the

Re: Unused and empty tables - what impact on mysql

2009-01-14 Thread Claudio Nanni
Empty files, like empty tables is not synonym for useless or unused. Of course it depends from the storage engine used but in the list of performance tuning removing empty tables is way way down, they have almost no impact while not used. The bottom line, remove only when sure 100% of their

Re: Unused and empty tables - what impact on mysql

2009-01-14 Thread Brent Clark
Claudio Nanni wrote: Empty files, like empty tables is not synonym for useless or unused. Of course it depends from the storage engine used but in the list of performance tuning removing empty tables is way way down, they have almost no impact while not used. The bottom line, remove only when

default storage engine

2009-01-14 Thread mikesz
Hello mysql, Greetings in the New Year to everyone. Hope for only good things... I have been using a WAMP for maybe 5 years, started with Apache2Triad and eventually evolved to WAMPSERVER which is what I am running now. Over the years, I have upgraded my server many times and the procedure that

Upgrage MYSQL 5.0 to 5.1 :: Using unsupported buffer type

2009-01-14 Thread elekis
hi all, We have a c application who work perfecty with mysql 5.0. We decide to upgrade and use mysql 5.1. Since that, nothing work, in owr log, we have always the follonig error Using unsupported buffer type: 254 (parameter: 2) when we call the mysql_stmt_bind_result function what we do is a

Re: default storage engine

2009-01-14 Thread Walter Heck
You can only copy files liek that for MyISAM tables. Are you sure you didn't accidentally convert to INNODB somewhere along the line? If so, go back to your old install and dump everything so you can import it in the new install, or convert everything back to MyISAM in the old install before

Re: Upgrage MYSQL 5.0 to 5.1 :: Using unsupported buffer type

2009-01-14 Thread Walter Heck
Could it be associated with one of the known issues listed at http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-5-0.html ? quote: Incompatible change: In MySQL 5.1.25, a change was made to the way that the server handles prepared statements. This affects prepared statements processed at the

Re: Upgrage MYSQL 5.0 to 5.1 :: Using unsupported buffer type

2009-01-14 Thread elekis
heu... sorry but something I don't understand, what I did is remove the mysql dierctory (programFile\mysql) remove the data directory,( C:\Documents and Settings\All Users\Application Data) remove all key who are in regedit and contain mysql (more or less). remove the services, restart my

Re: How to avoid Using temporary; Using filesort

2009-01-14 Thread Johan Thorvaldsson
Not really, the query took 4-5 seconds. The query runs through 13910 rows according to explain, that isnt alot is it? SELECT COUNT(*) antal,ad.ad_id FROM ad INNER JOIN tag_ad_map tm ON tm.ad_id=ad.ad_id WHERE tm.tag_id IN (99, 10807, 20728, 21, 135) AND ad.is_removed = 0 AND ad.is_active=1

Fwd: Upgrage MYSQL 5.0 to 5.1 :: Using unsupported buffer type

2009-01-14 Thread elekis
I m really sorry,I read and re Read but I understang nothing , maybe it's cause I m noob with mysql or maybe cause the subject is not explicit. when I say 5.0 to 5.1 it's just the code not the database. like I explain I TOTALY remove mysql 5.0 AND THE DATA , all data files, all registery,

Restarting MySQLD when all transactions are complete

2009-01-14 Thread John Daisley
Hi, Probably a simple question for someone who knows :) Is there a way to force MySQLD to restart after it has finished processing all current transactions? I seem to remember from the bit of Oracle work I did in the past we could do a Transactional Restart in Oracle 10g which caused the server

Re: default storage engine

2009-01-14 Thread Claudio Nanni
I don't know if this can be useful, just a few things I found out. INNODB engine does not start if you have already files into the directory and you change the file size in the my.cnf either of the innodb Datafile or innodb Logfile, remove innodb files before starting mysql. Moreover MyISAM is the

frequent issues restoring mysqldump file

2009-01-14 Thread Andy Smith
Hi, I'm not asking this as a specific question, more a general gripe looking for some kind of explanation. I don't do mysql restores very often, but many times when I have tried I get nasty errors as if its bombing out due to dodgy characters, or quote problems etc. Normally I am doing

Re: VC++ 2008 / MySQL debug / Unhandled exception

2009-01-14 Thread Miguel Cardenas
Hi I tested with both release and debug versions and the problem is the same, it fails when calling mysql_real_connect() shared memory request function strcpy() asm code access violation to 0x Regards, Miguel On Sun, Jan 11, 2009 at 9:57 AM, Patrick Sherrill

Re: Restarting MySQLD when all transactions are complete

2009-01-14 Thread ceo
Read the mysqld man pages about what it does with kill -X signals. One of them may mean graceful stop Or not. If there is one, you'd still have to figure out how to tie that into a re-boot or whatever for updates. Sounds like a perfectly reasonable feature request if you find nothing

Re: Upgrage MYSQL 5.0 to 5.1 :: Using unsupported buffer type

2009-01-14 Thread ceo
Did you re-compile/re-link your C app with the new MySQL header files?... Sounds like you didn't. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

RE: Unused and empty tables - what impact on mysql

2009-01-14 Thread Jerry Schwartz
-Original Message- From: Claudio Nanni [mailto:claudio.na...@gmail.com] Sent: Wednesday, January 14, 2009 4:50 AM To: Brent Clark Cc: mysql@lists.mysql.com Subject: Re: Unused and empty tables - what impact on mysql Empty files, like empty tables is not synonym for useless or unused. Of

Re: frequent issues restoring mysqldump file

2009-01-14 Thread Steve Holmes
Andy, I just had an interesting experience you might also find interesting. I rarely have to do restores, also (MySQL is very solid), but I just upgraded my (only) MySQL server. At the same time I upgraded the MySQL release from 5.0.45 to 5.0.67. While testing my procedure (which was a piece of

Re: VC++ 2008 / MySQL debug / Unhandled exception

2009-01-14 Thread Miguel Cardenas
Hi I'm using /MT (LIBCMT.lib?) and it is multi-threaded since all my multi-thread code is working. LIBCMTD.lib is ignored because it is indicated in a post at MySQL forums http://forums.mysql.com/read.php?45,49606,49606#msg-49606; and anyway applications do not compile if not ignored because

Re: Restarting MySQLD when all transactions are complete

2009-01-14 Thread ewen fortune
Hi, On Wed, Jan 14, 2009 at 3:00 PM, John Daisley john.dais...@mypostoffice.co.uk wrote: Hi, Probably a simple question for someone who knows :) Is there a way to force MySQLD to restart after it has finished processing all current transactions? I seem to remember from the bit of Oracle

Re: Query Optimization

2009-01-14 Thread Johnny Withers
The index hint is not in productoin code.. I was trying ot force it to use the index even when using the OR clause.. ment to take that out before I sent the email. The table structure is: CREATE TABLE `customer` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ssn` varchar(32) DEFAULT NULL,

high-availability loadbalanced mysql server farm

2009-01-14 Thread xufeng
Hi all, One website is based on LAMP(Linux+Apache+MySQL+PHP)(that is our case).We donot have very big tables or complicated database design.We only have one database. Because the php code is a third-party product we donot want to make much modification on the code. But when it comes to the

Re: Upgrage MYSQL 5.0 to 5.1 :: Using unsupported buffer type

2009-01-14 Thread elekis
oki, I found, it's the dll in system32 who was not suppress. thanks for all a++ On Wed, Jan 14, 2009 at 4:27 PM, c...@l-i-e.com wrote: Did you re-compile/re-link your C app with the new MySQL header files?... Sounds like you didn't. -- MySQL General Mailing List For list