RE: optimize a sql statement

2005-07-17 Thread 王 旭
Now,I make this sql statement to easy. Follow is the sql statement: - SELECT ol_i_id FROM orders,order_line WHERE order_line.ol_o_id = orders.o_id GROUP BY ol_i_id -

error: 'Can't create a new thread (errno 12).

2005-07-17 Thread ross
Hello everyone, I have seen this message crop up recently when connections are denied: mysqladmin: connect to server at 'localhost' failed error: 'Can't create a new thread (errno 12). If you are not out of available me mory, you can consult the manual for a possible OS-dependent bug' Un

Re: Separate disk for logs, DRBD ...

2005-07-17 Thread Bruce Dembecki
Dear All, Am planning on making MySQL write its data files to disk1 and log files to disk2. My questions are : 1. I know I can put the connections, slow, query, and InnoDB logs on disk2. Is it also possible (and advisable) to put the binary logs with them ? We log to the OS Disk, an

Re: mysql "forgets" user passwords

2005-07-17 Thread Michael Stassen
It's always a good idea to keep the thread on the list. That way, more people can help solve the problem, and others may benefit from the answers. Chris Fonnesbeck wrote: Here is what happens: mysql> GRANT ALL ON test.* TO [EMAIL PROTECTED] IDENTIFIED BY 'testing'; Query OK, 0 rows affected (

Re: Why does query load faster after executing 2nd time? (Query Caching DISABLED, Key-Cache already fully loaded)

2005-07-17 Thread sam . deforest
Hello therei have seen this question before, I cannot exactly remember when but it was a while ago. My advice is to go to the mysql.com website and do a search thru the mailing list using a search term something like "must execute query twice" or something to that effect. -sam > Filesystem bu

Re: more queries vs a bigger one

2005-07-17 Thread sam . deforest
Hello, approx. how long does it take your "big" query to run as it is now? Are these queries appending a table? or are they buiding a result (from a "chain" of queries)? Have you tried separating them out? Any difference? -sam > Hi, > > I have a big query that involves searching in more tables

RE: datetime/timestamps/4.1.12

2005-07-17 Thread sam . deforest
Mike, Have you tried creating a new table with a field for some sort of date? Try adding some data and see if the new date time format you specified in the my.cnf file. See if that works. -sam > Hello, > > Nevermind - duh -datetime is not timestamp (oneday I fullfill my promise > to myself and n

RE: datetime/timestamps/4.1.12

2005-07-17 Thread DePhillips, Michael P
Hello, Nevermind - duh -datetime is not timestamp (oneday I fullfill my promise to myself and not work on Sundays when my 'duh' level is a bit higher). Sofrom what I gather, the backward compatibility comes in the form of adding a +0 (string to int). This is most inconvenient and annoy

more queries vs a bigger one

2005-07-17 Thread Octavian Rasnita
Hi, I have a big query that involves searching in more tables, and I think this might be slower than creating more smaller queries. What do you think, is this true generally? The query searches in a big table but it also counts the number of records from other 2 tables based on a criteria, and us

datetime/timestamps/4.1.12

2005-07-17 Thread DePhillips, Michael P
Hello, I just upgraded to 4.1.12 from 4.0.22 and my timestamps changed formats to %Y-%m-%d %H:%i:%s So I added the following lime to my my.cnf file datetime_format=%Y%m%d%H%i%s Which is the format I prefer, I restart the server and my time stamps still appear as %Y-%m-%d %H:%i:%s The

Re: Why does query load faster after executing 2nd time? (Query Caching DISABLED, Key-Cache already fully loaded)

2005-07-17 Thread Greg Whalin
Filesystem buffering? pow wrote: Hi everyone, Im puzzling over why a query loads faster the second time I execute it. I am sure it is not query cached, because that is off. I also made sure that the key that is used was already cached b4 i even executed the query the first time. So it is not l

slow query

2005-07-17 Thread Octavian Rasnita
Hi, I have a problem with a query, because it works very slow and I am trying to analyze it with "explain". I have read that if I use STRAIGHT_JOIN in a select query, the server will take the tables in the order I specified them in that query. I have tried to "explain" a query that uses STRAIGHT

Separate disk for logs, DRBD ...

2005-07-17 Thread Sinang, Danny
Dear All, Am planning on making MySQL write its data files to disk1 and log files to disk2. My questions are : 1. I know I can put the connections, slow, query, and InnoDB logs on disk2. Is it also possible (and advisable) to put the binary logs with them ? 2. If disk2 is slower than

authentication - which hostname is used?

2005-07-17 Thread Per Jessen
Hi, when an IP-address is reverse mapped to multiple names, which one is used by mysql for user authentication? Right now (4.1.11) it looks like the first record is used, which I'm not sure good enough. Shouldn't mysql check all the returned names and see if one of them authenticates? /Per

Performance difference? : [SELECT ON Merge TableAB] vs [(SELECT ON Table A) UNION (SELECT ON TABLE B) ]

2005-07-17 Thread pow
Hi everyone, Take for example two identical tables A & B, and a MERGE table merging both of them. Would there be any performance advantage if I do a select (with a where criteria on an indexed column) on the MERGE table, as opposed to doing a union of two selects with the same WHERE criteria?

Multitable selection

2005-07-17 Thread Михаил Монашёв
Hello, I have 10 tables: table0: id, description, date table2: id, description, date ... table9: id, description, date Every table has 1 000 000 rows. How can I select all rows from this 10 tables ordered by date? What is faster: UNION or temporary table or something else ? mysql 4.1 Sincerely

Re: Switching legacy tables from 4.0 to 4.1 -AND- from default to UTF-8 .... ADVICE ANYONE?

2005-07-17 Thread Bruce Dembecki
On 7/15/05, Bruce Dembecki <[EMAIL PROTECTED]> wrote: > This process has worked for us taking our latin1 4.0 databases and > turning them into utf8 4.1 databases. UTF8 data we had already put in > our 4.0 database despite it's latin1 encoding was correctly exported > out of 4.0 and correctly co