RE: SELECT SPEEDS......

2003-08-21 Thread Michael S. Fischer
Paul DuBois [mailto:[EMAIL PROTECTED] writes: At 15:18 -0700 8/20/03, Michael S. Fischer wrote: This is trivial to benchmark yourself. Try: BENCHMARK(10, SELECT yada, yada FROM test WHERE id IN(1,2,3)) And compare to BENCHMARK(10, SELECT yada,yda FROM test WHERE (id =1 or id

RE: Will a SIGTERM shutdown while using LinuxThreads?

2003-08-21 Thread Michael S. Fischer
In my opinion, the discussion is moot. Unless you're running MySQL in a read-only environment, you should never restart the daemon automatically, because an improper shutdown is likely to yield table corruption, and if the tables are corrupted, attempting to write additional data can cause even

RE: Delete questions and speed/safety issues

2003-08-21 Thread Michael S. Fischer
It's quite possible you're using the wrong tool for the job. Since this is a write-intensive environment, you may get better performance by using another database such as PostgreSQL or Oracle. Alternatively, consider the option of re-architecting the application to distribute the writes across

RE: database reverted to 18hr old state after power outage

2003-08-21 Thread Michael S. Fischer
The database does write the data to disk when an UPDATE or INSERT is sent, but not synchronously. (IOW, it doesn't call fsync() after each write.) So there is no guarantee that the data will be in the tables when a power failure occurs. This is a tradeoff MySQL makes for speed because it's not

RE: MySQL 4.0.13 Memory problem under heavy load

2003-08-21 Thread Michael S. Fischer
Keep in mind that Linux will allocate nearly all of its free RAM to the buffer cache as the kernel opens and reads files to increase filesystem performance (cat /proc/meminfo and look at the buffers row) So, lack of free RAM may not mean what you think it means. As for the too many

RE: Delete questions and speed/safety issues

2003-08-20 Thread Michael S. Fischer
that, or alternatively, you can establish two database instances and swap between them, performing the defragmentation on the inactive database. --Michael -Original Message- From: Jack Coxen [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 11:43 AM To: 'Michael S. Fischer'; Jack

RE: SELECT SPEEDS......

2003-08-20 Thread Michael S. Fischer
This is trivial to benchmark yourself. Try: BENCHMARK(10, SELECT yada, yada FROM test WHERE id IN(1,2,3)) And compare to BENCHMARK(10, SELECT yada,yda FROM test WHERE (id =1 or id = 2 or id =3)) See http://www.mysql.com/doc/en/Miscellaneous_functions.html for documentation on the

RE: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Michael S. Fischer
] Sent: Wednesday, August 20, 2003 3:14 PM To: Michael S. Fischer Cc: [EMAIL PROTECTED] Subject: RE: Need help optimizing query, awfully slow on only 2 records Result of EXPLAIN is: table|type|possible_keys|key|key_len|ref|rows|Extra inquiries|ALL|contact_id| | | |8253

RE: moving MySQL

2003-08-20 Thread Michael S. Fischer
Sure, just shut down the database cleanly (mysqladmin shutdown), move the data directory intact to the new filesystem, and start up again. --Michael -Original Message- From: Jon Miller [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 8:41 AM To: [EMAIL PROTECTED] Subject:

RE: Mast-Master Replication

2003-08-20 Thread Michael S. Fischer
You're going to need to architect more than just a master-slave relationship to do what you want to do. All replication does is copy commands from one MySQL server to the other; it does not create a failover environment by itself. Creating a failover environment is beyond the scope of MySQL;

RE: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Michael S. Fischer
What does EXPLAIN SELECT query show? Have you read the chapter in the manual on optimizing queries? Do you have all the proper indices set up? --Michael -Original Message- From: Apollo (Carmel Entertainment) [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 2:52 PM To:

RE: Oracle DBA here looking for advice on MySQL ....

2003-08-20 Thread Michael S. Fischer
In a word, no. The way MySQL organizes its datafiles is trivial by comparison: one directory per database, two files per table (table.MYI and table.MYD), one is the datafile, the other is the index file. MySQL also does not preallocate space for its tables like Oracle does. --Michael

RE: Oracle DBA here looking for advice on MySQL ....

2003-08-19 Thread Michael S. Fischer
Michael, The reason you think there's not much to this database is that compared to Oracle, there really is not much to this database. :-) From a 50,000-foot point of view, it's really just a nice SQL interface to ISAM files (it started out that way, anyway). It is designed for

RE: PHP mysql_connect randomly failing

2003-08-19 Thread Michael S. Fischer
Are you connecting through a TCP or a UNIX domain socket? --Michael -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jon Drukman Sent: Tuesday, August 19, 2003 2:36 PM To: [EMAIL PROTECTED] Subject: PHP mysql_connect randomly failing I've got a library of

RE: marking all records based on a text file

2003-08-19 Thread Michael S. Fischer
The MySQL client won't be able to do that on its own; you'll need to write a script in your favourite scripting language to do that. --Michael -Original Message- From: Scott Haneda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:00 PM To: MySql Subject: marking all

Query cache query

2003-08-18 Thread Michael S. Fischer
I'm using MySQL 4.0.13 for a web application, and one of my queries is sufficiently complex such that it might take several seconds to return the results to the user. I'd like to return a please wait page if the query is not already in the cache. Is there a way (or a proposed way) of doing a

RE: Query cache query

2003-08-18 Thread Michael S. Fischer
Jeremy Zawodny writes: Perhaps you could tell us more about the queries that take too long. Maybe there are some things you can do to reduce that time? You don't want to go there. But because you do... :-) As far as I can tell, the queries are as optimized as they're going to get. I'm

InnoDB disk file grows, never shrinks

2003-04-03 Thread Michael S
My InnoDB file is set to 60MB, and is not set to autoexpand. When running stress tests against my server today, I got a message that the table was full and the test stopped. Sure enough, the InnoDB file was about 62MB. My question: I assume that the InnoDB file is the transaction log. Is there

Re: InnoDB disk file grows, never shrinks

2003-04-03 Thread Michael S
: Michael S [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Thu, 3 Apr 2003 23:45:28 -0600 My InnoDB file is set to 60MB, and is not set to autoexpand. When running stress tests against my server today, I got a message that the table was full and the test stopped. Sure enough, the InnoDB