Re: SQL_NO_CACHE

2009-03-04 Thread Micah Stevens
Keep in mind the file system caches too, so it might be working, but the file access is still getting put in memory. You should disable that too if you really want consistent results. In Linux you can dump the file system cache between each query, I have no clue how to do it in windows or other

Help with a query.

2009-01-27 Thread Micah Stevens
Hi, I'm somewhat stumped by how to set up a single query that does the following. Currently I'm accomplishing this through multiple queries and some PHP 'glue' logic, but it should be possible in a single query I think, and it's bugging me that I can't figure it out. If anyone has any ideas,

Re: Help with a query.

2009-01-27 Thread Micah Stevens
Peter Brawley wrote: Micah, each item in `a` has a 1 to 1 relationship to `b`, and each item in `c` has a 1 to 1 relationship with `b`. Sometimes these correspond, i.e. there's a row in `b` that relates to both `a` and `c`, but not always. So in a given b row, the b_id value might match an

Re: Changing port no of the server using command line method

2008-12-30 Thread Micah Stevens
On 12/30/2008 11:57 AM, Manish Sinha wrote: lists-mysql wrote: in a *nix environment, restarting the mysql server is done with a system-level command and requires *system* root privileges, not something that the average db-admin is likely to have. also, changing the port a service is

Re: Intersect question

2008-12-01 Thread Micah Stevens
On 12/01/2008 08:30 AM, Andrej Kastrin wrote: I have the table 'test' which includes two columns: 'study' and 'symbol': study symbol a2008 A a2008 B a2008 C a2008 D b2005 A b2005 B b2005 E The task is to perform an intersection on 'name' column according to all distinct values in

Re: Displaying information from table graphically

2008-11-22 Thread Micah Stevens
On 11/21/2008 07:55 AM, David Giragosian wrote: On 11/21/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a PHP application that accesses data from MySQL. There is table called rooms, and table called beds. There is another table called patients. Patients are being placed into beds,

Re: Displaying information from table graphically

2008-11-22 Thread Micah Stevens
On 11/22/2008 04:30 PM, Jujitsu Lizard wrote: Summary: (a) Both approaches are quite good, and (b) the CPU efficiency argument for stuffing prepared images into a table or similar may be weak. The Lizard By using pre-drawn images and HTML img tag calls you distribute the processing to

Re: Displaying information from table graphically

2008-11-22 Thread Micah Stevens
On 11/22/2008 07:14 PM, Micah Stevens wrote: On 11/22/2008 04:30 PM, Jujitsu Lizard wrote: Summary: (a) Both approaches are quite good, and (b) the CPU efficiency argument for stuffing prepared images into a table or similar may be weak. The Lizard By using pre-drawn images

Re: Overhead Issue

2008-11-17 Thread Micah Stevens
Deleted rows. On 11/17/2008 04:56 PM, sangprabv wrote: Hi, I just want to know what things that cause table/db overhead? Because I have my tables always get overhead problem. And must run OPTIMIZE query every morning. Is there any other solution? TIA. Willy -- MySQL General Mailing

Re: Overhead Issue

2008-11-17 Thread Micah Stevens
There is little performance hit due to this. It would only start to affect performance when the overhead started to increase to the point that it was a significant percentage of the total table size. Perhaps someone else can ring in here with real numbers but I'd say it'd have to be 10-20% of your

Re: Overhead Issue

2008-11-17 Thread Micah Stevens
I don't think this is indicative of a design issue. Some tables need data removed more often than others, however Moon's Father brings up an excellent point. If you CAN resolve this with a change in design, that would be the best solution of course. -Micah On 11/17/2008 06:50 PM, Moon's Father

Re: Row before and after?

2008-11-12 Thread Micah Stevens
Select the UserId one less, and then ORDER ASC LIMIT 3. Assuming your UserId's are sequential, it's easy, given userID X SELECT * FROM Users WHERE UserId = X-1 ORDER BY UserId ASC LIMIT 3; If they're not sequential due to deletions, etc, it becomes a bigger problem. You could do a subquery, but

Re: when calling mysql_real_connect from the c api, I get a malloc() memory corruption error.

2008-10-29 Thread Micah Stevens
A working server relies on the MySQL binary, and system libraries, and the hardware itself. From your description you don't address the library compatibility. Have you ensured that your set of libraries is the same? -Micah On 10/29/2008 11:15 AM, Kevin Stevens wrote: ello, I am encountering

Re: Deployment of Database in a DEB package.

2008-10-28 Thread Micah Stevens
It's a package for Debian based systems, which include Ubuntu and a few others.. It's like an RPM for Fedora/Redhat linux. -Micah On 10/27/2008 06:39 PM, Moon's Father wrote: I'm sorry that if I can ask a question.What is DEB? On Fri, Oct 3, 2008 at 9:49 PM, US Data Export [EMAIL

Re: Relational Databasing on busy webserver (Benchmark of Enum?!)

2008-09-23 Thread Micah Stevens
On 09/23/2008 02:42 PM, Ben A.H. wrote: I figured that was what you meant... I guess my table didn't work (see above message...don't ya' love plaintext :-O)... Has anyone ever tried to benchmark the difference between utilizing ENUMs vs. traditional relational databasing? I would think ENUM

Re: Selecting around a circular reference?

2008-09-06 Thread Micah Stevens
Did you try this? SELECT sum(fooditems.carb * mealitems.quantity) as sumcarbs, sum(fooditems.gi * ((fooditems.carb * mealitems.quantity) / sum(fooditems.carb * mealitems.quantity))), sum(fooditems.gl * mealitems.quantity), sum(fooditems.cal * mealitems.quantity)

Re: Connection failed!!

2008-08-25 Thread Micah Stevens
There's probably a password set. Look up how to reset a password: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html On 08/25/2008 03:25 AM, Matthew Stuart wrote: I have just loaded MySQL 5 and MySQL Front on to a new computer, and I am now getting a MySQL-Error which is:

Re: debian-sys-maint

2008-01-03 Thread Micah Stevens
This is one of the few decisions the debian package maintainers made that I disagree with, but the idea is that when you install mysql, there is this user created with a random password. This gives the package maintainers a way to script updates in SQL if necessary to run on the database

Re: Data directory in 2 platforms

2007-12-27 Thread Micah Stevens
On a dual boot it should work okay. I've done a similar thing, by taking the data folder from a Linux installation, copying it to a local windows computer and using a local install (same version of course) to read it. It worked fine. I would think the scenario is much the same as what you're

Re: Determining Table Storage Engine Type on Crashed Table

2007-11-22 Thread Micah Stevens
Look at the data files. The extension of the file will tell you. On 11/21/2007 12:42 PM, Richard Edward Horner wrote: Hey everybody, Hopefully some of you are already enjoying time off. I am not...yet :) Anyway, is there a way to determine what storage engine a table is using if it's

Re: Memory Problems

2007-05-15 Thread Micah Stevens
I think you may be able to get around this by using multiple key buffers? (MySQL 4.1 or later) -Micah On 05/15/2007 01:24 AM, Christoph Klünter wrote: Hi List, We have a mysql-Server with 8G of Ram. But mysql doesn't use this ram. But we get following error: May 14 22:56:11 sql

Re: Max columns in a tabel in MyISAM storage engine

2007-04-17 Thread Micah Stevens
Fabian Köhler wrote: Hello, i have table with answers to questions. Every answer is a column in the table. i.e. id|q1|q2|q3 1|answer1|answer2|answer5 2|answer3|answer4|asnwer6 another option to save it would be sth like this: id|field|value 1|q1|answer1 1|q2|answer2 1|q3|answer5

Re: Max columns in a tabel in MyISAM storage engine

2007-04-17 Thread Micah Stevens
On 04/17/2007 04:18 AM, Fabian Köhler wrote: Thanks for all the input. The problem i have with this idea: Really? Wow, my opinion is that you're trying to do in one table what you should do in two. Have a questions table, and an answers table. The answers table would have a column

Re: renaming database

2007-04-12 Thread Micah Stevens
Yeah, in SQL: RENAME DATABASE start_name TO new_name; -Micah On 04/12/2007 01:34 AM, Octavian Rasnita wrote: Hi, How can I rename a database if it contains InnoDB tables? I have tried renaming the directory where it is located, but it doesn't work this way. Is there a method that works

Re: question about Queries per second avg

2007-04-06 Thread Micah Stevens
It's just telling you how many queries per second on average the server is receiving. This says nothing about how long it takes to execute a particular query. -Micah On 04/06/2007 01:22 AM, C.R.Vegelin wrote: Hi List, Using printf( System status: %s\n, mysqli_stat($link)); in a PHP script,

Re: Joins versus Grouping/Indexing: Normalization Excessive?

2007-04-02 Thread Micah Stevens
I think you're approaching this from the wrong angle. You'll want to put the data at the highest level at which it changes. i.e. If every song on an album is always the same year, put it at the album level, however, if it changes from song to song on a particular album, then you want it at

Re: CVS-Like System For Database Changes

2007-04-01 Thread Micah Stevens
Using ALTER statements would make it tough to get a complete view. I would stick with your original idea. This would enable diffs to work nicely, and the latest revision would contain everything you need to know to create the database. -Micah On 04/01/2007 07:11 AM, Miles Thompson wrote:

Re: some questions about recovering/migrating databases

2007-04-01 Thread Micah Stevens
On 04/01/2007 09:06 AM, Jonathan Horne wrote: i have a production system running FreeBSD 6.2-p3/MySQL 5.0.33, with 2 databases. i also have a development box, which is pretty much a mirror of my production system, that i would like to import my databases into. daily, the production system

Re: CVS-Like System For Database Changes

2007-04-01 Thread Micah Stevens
): http://db.apache.org/ddlutils/ant/ Then you can store these ant scripts in your VCS (version control system). To create or destroy the schema with data just run an ant target and you would be done. Anoop On 4/1/07, Micah Stevens [EMAIL PROTECTED] wrote: Using ALTER statements would make

Re: CVS-Like System For Database Changes

2007-04-01 Thread Micah Stevens
On 04/01/2007 03:28 PM, Anoop kumar V wrote: Sql create statements need to be run using a compatible client. sqlplus for oracle, mysqlclient for mysql etc.. Here you just have a target as part of your routine build that also takes care of building / renewing your database with (or w/o) data.

Re: unable to recover a mediawiki database

2007-03-31 Thread Micah Stevens
Did you shut down the database when you backed up the data folder, or was it running? Sounds like file corruption to me which can occur from grabbing those data files while they're being used by the database. If the table type is innoDB, I'm not much use, but if they're MyISAM, the command

Re: Sorting Problem

2007-03-26 Thread Micah Stevens
://www.softtools.com -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Sunday, March 25, 2007 9:23 PM To: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: Sorting Problem This doesn't work? SELECT businesses.name from businesses left join links using (businessID) left join

Re: Getting SQL errors porting databases between MySQL v4 and v5

2007-03-26 Thread Micah Stevens
group is a reserved word, so MySQL thinks you're attempting a 'group by' statement. Put backticks around group, you should always quote your table and column names. DROP TABLE IF EXISTS `admission_quotes`; CREATE TABLE `admission_quotes` ( `id` int(4) NOT NULL auto_increment, `quote` text,

Re: Sorting Problem

2007-03-25 Thread Micah Stevens
This doesn't work? SELECT businesses.name from businesses left join links using (businessID) left join categories using (categoryID) where category.name = 'something' order by businesses.name ASC On 03/25/2007 12:40 PM, Sid Price wrote: Hello, I have a MySQL database design that

Re: max_rows query + SegFaulting at inopportune times

2007-03-22 Thread Micah Stevens
This table size is based on your filesystem limits. This is a limit of the OS, not MySQL. -Micah On 03/22/2007 01:02 PM, JP Hindin wrote: Addendum; On Thu, 22 Mar 2007, JP Hindin wrote: Zero improvement. I used the following CREATE: MAX_ROWS=10; At first I thought

Re: max_rows query + SegFaulting at inopportune times

2007-03-22 Thread Micah Stevens
. If it was only that simple :) On Thu, 22 Mar 2007, Micah Stevens wrote: This table size is based on your filesystem limits. This is a limit of the OS, not MySQL. -Micah On 03/22/2007 01:02 PM, JP Hindin wrote: Addendum; On Thu, 22 Mar 2007, JP Hindin wrote: Zero improvement. I