about: Select tables optimized away

2005-07-18 Thread 王 旭
When I explain SELECT MAX(o_id)-1 FROM orders,it tell me Select tables optimized away.What is it meaning?It show me good or bad? thanks! _ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn -- MySQL General

Re: optimize a sql statement

2005-07-18 Thread 王 旭
NO effect :-( From: pow [EMAIL PROTECTED] To: 王 旭 [EMAIL PROTECTED] Subject: Re: optimize a sql statement Date: Mon, 18 Jul 2005 11:51:23 +0800 Do u have composite index on order_line.ol_o_id AND order_line.ol_i_id? You could try that... 王 旭 wrote: Now,I make this sql statement to easy.

optimize a order by statement

2005-07-18 Thread 王 旭
Follow is the sql statement: explain SELECT ol_i_id FROM orders, order_line WHERE orders.o_id = order_line.ol_o_id and o_id0 ORDER BY SUM(ol_qty)DESC Follow is the explain output:

Re: more queries vs a bigger one

2005-07-18 Thread Gleb Paharenko
Hello. It is a hard task to answer if we don't see your queries and tables' structure. Sometimes several small queries could be faster than a big one. For example, often, query with subqueries or union runs slower than few queries which use temporary tables. Octavian Rasnita [EMAIL

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

2005-07-18 Thread Gleb Paharenko
Hello. [EMAIL PROTECTED] gleb]$ perror 12 OS error code 12: Cannot allocate memory Very often it is ulimits problem. Check if your server has enough memory as well. The cause of problem sometime might be unofficial binaries. If nothing helps, switch to binaries from MySQL AB.

Re: MySQL 5.0.9 build problem

2005-07-18 Thread Gleb Paharenko
Hello. Building MySQL Server manually could be a thankless and painful work. You should have the same build environment as MySQL AB team. Use official binaries. Peregrine [EMAIL PROTECTED] wrote: [-- text/plain, encoding quoted-printable, charset: utf-8, 77 lines --] Hello,

Re: about: Select tables optimized away

2005-07-18 Thread Gleb Paharenko
Hello. Similar questions were asked in the list before. For example see: http://lists.mysql.com/mysql/41542 Search in archives at: http://lists.mysql.com/mysql From sources I've found that this message appears when optimizing queries with count(*), min() and max(). The above

Re: MySQL 5.0.9 build problem

2005-07-18 Thread Joerg Bruehe
Hello! Peregrine wrote: [[...]] While trying to build RPMs for 5.0.9-beta, I have run into this error: [[...]] Starting Tests TESTRESULT --- alias [ pass ] Well, if you got this far,

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

2005-07-18 Thread Gleb Paharenko
Hello. I've searched in the archives at: http://lists.mysql.com/mysql but the only thing I've found is that the speed difference is rather low. In my opinion, using UNION is a more flexible solution. pow [EMAIL PROTECTED] wrote: Hi everyone, Take for example two identical

Views in 5.0.1

2005-07-18 Thread Ben Clewett
Dear MySQL, I have need to use VIEWS. (This is to protect my database from programmers, but that's another story :) This is available in version 5.0.1, which is not at release level yet. We are on 4.1.9. May I ask a couple of questions! Approximately when will 5.0.1 be available as stable

Re: Views in 5.0.1

2005-07-18 Thread Joerg Bruehe
Hi Ben! Ben Clewett wrote: [[...]] Approximately when will 5.0.1 be available as stable release? 5.0.1 will never change, it is out (and obsolete by now). You probably refer to the 5.0 family of releases, of which 5.0.9-beta was published last week. The 5.0 releases have to pass the beta

MySQL / DBI Question

2005-07-18 Thread TheRefUmp
Hello all, This may be a little bit off topic for MySQL newsgroup but here goes.I'm trying to retrieve variables such as basedir and datadir. PERL/DBI returns 2 rows for each varialbe. The first is the name and the second is a value. Is there a way to get PERL/DBI to return each variable

re: query hasn't worked properly since Mysql 5.0.6

2005-07-18 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a query that uses a subquery that works under mysql 4.1 and 5.0.6, but doesn't work on 5.0.7 or 5.0.9 I am trying to understand why it may be having a problem so I can make a test case to demonstrate it, and am hoping that someone may have an

Re: creating a faster query

2005-07-18 Thread Brent Baisley
Don't look at it as a string, you're not searching on a string. What you are actually searching on is a range of dates, the first of the month through the end of the month. That will keep your data in a date format and use the index. SELECT ... WHERE date between

Re: Impossible join?

2005-07-18 Thread Jonathan Mangin
Jonathan Mangin wrote: Hello all, I'm storing data from a series of tests throughout each 24-hour period. I thought to create a table for each test. (There are six tests, lots more cols per test, and many users performing each test.) But each test is performed no more than once per day by

migrate from 3.x to 4.1 character set problem

2005-07-18 Thread Farkas Levente
hi, we've got an old mysql-3.23.58 and a new mysql-4.1.10a and we'de like to migrate our data, but it doesn't seems to be so easy:-( out old server has a latin2 database. after we dump it and try tp import into the new ones we always got errors or the spical accented hungarian characters are

Re: Views in 5.0.1

2005-07-18 Thread Ben Clewett
Joerg, I am trying to work out how stable 5.0.x is. Related to why MySQL advise people to wait for the 'release' status. You say 5.0.1 is old and obsolete. Yet is not at release stage yet. This is curious. Will 5.0.1 be changed before release? For example: Will large errors (eg,

Illegal mix of collations

2005-07-18 Thread Marco Pöhler
Hello List, I've tried to set up a slave from an existing master using innobackup. The copy of the database was successful, but when I started the replication, the following error occured: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='' on

RE: Multitable selection

2005-07-18 Thread Berman, Mikhail
Hi Mihail, We have nightly process that creates a summary table from multiple tables in the similar situation. Best, Mihail Berman -Original Message- From: Михаил Монашёв [mailto:[EMAIL PROTECTED] Sent: Sunday, July 17, 2005 3:41 AM To: mysql@lists.mysql.com Subject: Multitable

RE: Views in 5.0.1

2005-07-18 Thread Cope, Jared
Hi, I think you may be getting confused with the version 5 'releases' available. It helps to understand the MySQL release cycle a little bit and then it may become clearer. Basically, version 5 is in alpha and beta stages at the moment which means that the developers are very actively working on

log file

2005-07-18 Thread prathima rao
hi, how to create a log file of the updates done on the data in visual basic or in mysql for a particular record for example i have a purchase order record in which my junior changes say rate without my knowledge how will i know what has been changed p rao -- MySQL General Mailing List For

Re: Views in 5.0.1

2005-07-18 Thread Michael Stassen
Ben Clewett wrote: Joerg, I am trying to work out how stable 5.0.x is. Related to why MySQL advise people to wait for the 'release' status. You say 5.0.1 is old and obsolete. Yet is not at release stage yet. This is curious. Will 5.0.1 be changed before release? For example: Will

getLong() vs getInt() result differs on unsigned field

2005-07-18 Thread Bill Easton
Kevin, What you are overlooking is that 4294967298 is outside the range of Java's int--it's 0x10002. So, when it's converted to int, the high order bit gets discarded, and you are left with a result of 2. JDBC behaves as would be expected. public class TestLong { final public static

Re: getLong() vs getInt() result differs on unsigned field

2005-07-18 Thread Kevin McAllister
Bill, Thank you for this. While that is true, the problem is that the number in the database is actually 2 and not 4294967298. It seems the connector/j is sticking that highest bit in there itself, or misbehaving in some other way. Apparently it has been fixed just hasn't been released

Re: Separate disk for logs, DRBD ...

2005-07-18 Thread Gary Richardson
Make sure your disks are all redundant -- get two of each and mirror them. You'll thank yourself when a drive dies. If the database server has any uptime requirements, I recommend going hotswap for everything -- you'll thank yourself again when you can swap the drive out during core business

Re: log file

2005-07-18 Thread Bruce Ferrell
enable the bin log in mysql. It doesn't log transactions i.e. what it was, what it became, but the update will be logged prathima rao wrote: hi, how to create a log file of the updates done on the data in visual basic or in mysql for a particular record for example i have a purchase order

Re: creating a faster query

2005-07-18 Thread Michael Stassen
Brent Baisley wrote: Don't look at it as a string, you're not searching on a string. What you are actually searching on is a range of dates, the first of the month through the end of the month. That will keep your data in a date format and use the index. SELECT ... WHERE date between

Reload mysqld configuration without restart?

2005-07-18 Thread John Trammell
Is it possible for mysqld to reload its configuration files without doing an explicit stop/start? I've searched the online documentation plus my copy of the DuBois book to no avail. The fact that the Debian init scripts don't do a proper config reload (just the GRANT tables) does not give me

User Previlage Vs Tables

2005-07-18 Thread Aiby
Does it posible to set a user previlage to table wise!! Rather then a Whole Database. -- Aiby

Re: mysql forgets user passwords

2005-07-18 Thread Michael Stassen
Please keep this on the list. Chris Fonnesbeck wrote: Something seems rather screwed up; I was starting from scratch by revoking all privileges from joe and deleting him. I got the following: mysql REVOKE ALL PRIVILEGES ON *.* FROM 'joe'@'localhost'; Query OK, 0 rows affected (0.00 sec)

Cant Get Access to My Databases

2005-07-18 Thread Tim Holmes
Good Morning: I have finally gotten my MySQL server up and running. However, I am having a bit of difficulty getting connected. I am using Dreamweaver to construct PHP pages for dynamic data, and phpMyAdmin to manage the databases, however when I try to connect by either method, I get a message

[Fwd: Re: DROP FUNCTION doesn't work]

2005-07-18 Thread Nuno Pereira
[EMAIL PROTECTED] wrote: mysql create function betatouni returns string soname 'libbeta2.so'; ERROR 1026 (HY000): Error writing file 'mysql.func' (errno: 121) Using perror from Linux, I saw: $ perror 121 Error code 121: Remote I/O error You probably have communications problems. Maybe you

Renaming a database

2005-07-18 Thread Scott Hamm
How do I rename a database? The help online is pretty ambigous. -- Power to people, Linux is here.

RE: Impossible join?

2005-07-18 Thread Gordon Bruce
Here is one way. Some time ago I set up a table named count with one field named count and built 5000 rows of incrementing values . I think I originally populated it by originally createing it with a 2nd field CREATE TABLE `count` ( `count` int(10) unsigned NOT NULL auto_increment,

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

2005-07-18 Thread ross
On Mon, Jul 18, 2005 at 10:33:49AM +0300, Gleb Paharenko wrote: [EMAIL PROTECTED] gleb]$ perror 12 OS error code 12: Cannot allocate memory Very often it is ulimits problem. Check if your server has enough memory as well. The cause of problem sometime might be unofficial binaries. If

re: query hasn't worked properly since Mysql 5.0.6

2005-07-18 Thread SGreen
James Black [EMAIL PROTECTED] wrote on 07/18/2005 08:42:31 AM: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a query that uses a subquery that works under mysql 4.1 and 5.0.6, but doesn't work on 5.0.7 or 5.0.9 I am trying to understand why it may be having a problem so I can make

Re: User Previlage Vs Tables

2005-07-18 Thread SGreen
Aiby [EMAIL PROTECTED] wrote on 07/18/2005 11:15:26 AM: Does it posible to set a user previlage to table wise!! Rather then a Whole Database. -- Aiby Yes! You can even determine permissions for specific columns, if you really want to. Details here:

Re: Renaming a database

2005-07-18 Thread SGreen
Scott Hamm [EMAIL PROTECTED] wrote on 07/18/2005 12:01:49 PM: How do I rename a database? The help online is pretty ambigous. -- Power to people, Linux is here. I wouldn't say ambiguous. I would rather say indirect. Renaming a database is nearly the same thing as moving tables to a new

RE: Renaming a database

2005-07-18 Thread Gordon Bruce
A database in MySQL is simply a directory. So just rename the directory with appropriate tool for your platform. On my test box this becomes mysql show databases; ++ | Database | ++ | information_schema | | lois | | mailprint | |

Different versions differnet results

2005-07-18 Thread shantanu oak
I am getting two different results for the same set of commands on two different versions of MySQL. Can anyone explain what the issue is? CREATE TABLE `testdecimal` ( `rate` decimal(7,4) NOT NULL default '0.' ) ENGINE=MyISAM; INSERT INTO testdecimal SET rate=1468; select * from

Re: Impossible join?

2005-07-18 Thread Dawid Kuroczko
On 7/16/05, Jonathan Mangin [EMAIL PROTECTED] wrote: Hello all, I'm storing data from a series of tests throughout each 24-hour period. I thought to create a table for each test. (There are six tests, lots more cols per test, and many users performing each test.) select test1.date,

RE: Reload mysqld configuration without restart?

2005-07-18 Thread John Trammell
Thanks for replying. Some doc pages pertaining to this are: http://dev.mysql.com/doc/mysql/en/dynamic-system-variables.html http://dev.mysql.com/doc/mysql/en/system-variables.html Unfortunately I need to change some that are not dynamic. Many (most?) servers offer this functionality; it would

Re: Reload mysqld configuration without restart?

2005-07-18 Thread Gleb Paharenko
Hello. I don't know a general way to force MySQL Server to reread it's configuration file, however you could dynamically change lots of variables using SET @@global.xx syntax. FLUSH command could be helpful as well. See: http://dev.mysql.com/doc/mysql/en/system-variables.html

Slow Query Using Index

2005-07-18 Thread Ed Pauley II
I have notices some slow queries showing up in my slow query log lately. Two of these queries are relatively simple queries using the index of their respective tables. Both of these tables are very large and I suspect this to be the problem. This problem appears to have started within the last

Re: Different versions differnet results

2005-07-18 Thread Dan Nelson
In the last episode (Jul 18), shantanu oak said: I am getting two different results for the same set of commands on two different versions of MySQL. Can anyone explain what the issue is? CREATE TABLE `testdecimal` ( `rate` decimal(7,4) NOT NULL default '0.' ) ENGINE=MyISAM; INSERT

Re: Views in 5.0.1

2005-07-18 Thread Joerg Bruehe
Hi Ben, all! Ben Clewett wrote ((re-ordered into posting sequence)): Joerg Bruehe wrote: Hi Ben! Ben Clewett wrote: [[...]] Approximately when will 5.0.1 be available as stable release? 5.0.1 will never change, it is out (and obsolete by now). [[...]] I am trying to work out how

RE: Different versions differnet results

2005-07-18 Thread Edwin Cruz
Is because 7 is the size of the record, and 4 is the size of the decimals so: Decimal(7,4) can allocate only 999. If you want to allocate 1468 then you must declare as decimal(8,4) to 4 decimals and 4 integers in version 5 is the same as oracle The first parameter is the total number

Re: migrate from 3.x to 4.1 character set problem

2005-07-18 Thread Bruce Dembecki
hi, we've got an old mysql-3.23.58 and a new mysql-4.1.10a and we'de like to migrate our data, but it doesn't seems to be so easy:-( out old server has a latin2 database. after we dump it and try tp import into the new ones we always got errors or the spical accented hungarian characters

Re: Illegal mix of collations

2005-07-18 Thread Gleb Paharenko
Hello. Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='' on query. Default What default charset do your slave's tables have? The coercibility value of system constants has changed in 4.1.11. Though it seems not related to your problem I

Crystal reports with MySQL

2005-07-18 Thread Mayuresh Kshirsagar
I need to use crystal reports with MySQL database. We have MySQL query browser to query audit database of meta directory. Can I use ODBC connection for my crystal report with MySQL database? If yes, then please let me know what ODBC driver I need to install? OR how can I make connection to

Re: Cant Get Access to My Databases

2005-07-18 Thread Gleb Paharenko
Hello. See: http://dev.mysql.com/doc/mysql/en/access-denied.html Tim Holmes [EMAIL PROTECTED] wrote: Good Morning: I have finally gotten my MySQL server up and running. However, I am having a bit of difficulty getting connected. I am

Re: Different versions differnet results

2005-07-18 Thread SGreen
shantanu oak [EMAIL PROTECTED] wrote on 07/18/2005 01:17:57 PM: I am getting two different results for the same set of commands on two different versions of MySQL. Can anyone explain what the issue is? CREATE TABLE `testdecimal` ( `rate` decimal(7,4) NOT NULL default '0.' )

Re: MySQL / DBI Question

2005-07-18 Thread Gleb Paharenko
Hello. What about using SELECT @@global.xxx? It returns only one column. See: mysql select @@global.old_passwords; ++ | @@global.old_passwords | ++ | 1 | ++ [EMAIL PROTECTED] wrote:

RE: Crystal reports with MySQL

2005-07-18 Thread Scott Johnson
Hi, You simply install the MyODBC interface and away you go. You simply create a connect and Us crystal as if it was a connection to the other windows database. hahaha I have included the link below: http://dev.mysql.com/downloads/connector/odbc/3.51.html Scott. [EMAIL PROTECTED] www.Wilty.ca

Re: Slow Query Using Index

2005-07-18 Thread Brent Baisley
There is a limit, but that is really limited to the hardware you are running it on. You need to figure out what part of your system is bottlenecking (disk I/O, RAM, CPU, or network I/O). Perhaps you have to little RAM and/or your mysql configuration variables are not set optimally. Too

Re: Setting default character_set_results

2005-07-18 Thread Batara Kesuma
Hi Gleb, Please check, if putting of these lines into my.cnf solves the problem: [dbdmysql] default-character-set = ujis Yupe! It works. Thank you very much :) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: MySQL 5.0.9 build problem

2005-07-18 Thread Peregrine
On Monday 18 July 2005 02:09am, Gleb Paharenko wrote: Hello. Building MySQL Server manually could be a thankless and painful work. You should have the same build environment as MySQL AB team. Use official binaries. Thank you for your advice, though you have not attempted to answer my

Re: mysql forgets user passwords

2005-07-18 Thread Chris Fonnesbeck
On 7/18/05, Michael Stassen [EMAIL PROTECTED] wrote: Hmmm... In that case, I have more questions. Log in as root and run SHOW VARIABLES LIKE '%pass%'; DESC user password; and post the results. Also, was this a brand new installation, or an upgrade? If an upgrade, from what

Re: MySQL 5.0.9 build problem

2005-07-18 Thread Peregrine
On Monday 18 July 2005 03:06am, Joerg Bruehe wrote: Hello! Peregrine wrote: [[...]] While trying to build RPMs for 5.0.9-beta, I have run into this error: [[...]] Starting Tests TESTRESULT ---