Re: a query not using index

2010-11-08 Thread Johan De Meersman
| +++-+--+--++ the desc shows it isn't using the index: mysql desc select * from ip_test where 3061579775 between startNum and endNum; ++-+-+--+-+--+-+--++-+ | id | select_type | table | type

Problems storing a blob using php.

2010-11-07 Thread Richard Riley
Debian squeeze, mysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (i486) using readline 6.1, PHP 5.3.3-2 with Suhosin-Patch (cli) (built: Oct 21 2010 18:58:27). I'm not sure if this group or the php one is more appropriate but thought I would try here first as it is perhaps a mysql setting I

Verify replication slave is using SSL

2010-11-01 Thread Paul Nowosielski
Dear All, I just want to verify my rep slave is using ssl. When I run this command mysql \s I get: mysql \s -- mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (x86_64) using readline 5.1 Connection id: 5 Current database: Current user: r...@localhost SSL

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-20 Thread Tanmay Pradhan
...@gmail.com wrote: Hi Pradhan, Obviously, it should fail. Since you have deleted the root user which is used by mysqldump for making connection to mysql server for taking backup Krishna CGI.COM On Tue, Oct 19, 2010 at 11:06 AM, Tanmay Pradhan tanma...@gmail.com wrote: Hi, I am using

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-19 Thread Krishna Chandra Prajapati
Hi Pradhan, Obviously, it should fail. Since you have deleted the root user which is used by mysqldump for making connection to mysql server for taking backup Krishna CGI.COM On Tue, Oct 19, 2010 at 11:06 AM, Tanmay Pradhan tanma...@gmail.com wrote: Hi, I am using the following version

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-19 Thread Michael Dykman
to mysql server for taking backup Krishna CGI.COM On Tue, Oct 19, 2010 at 11:06 AM, Tanmay Pradhan tanma...@gmail.com wrote: Hi, I am using the following version of MySQL on my Mac OS X Server 10.5.8: *** Ver 14.14 Distrib 5.4.1-beta, for apple-darwin9.5.0 (i386) using readline 5.1

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-19 Thread Shawn Green (MySQL)
other program and can authenticate with the MySQL instance (the database daemon) as any valid user. Krishna CGI.COM On Tue, Oct 19, 2010 at 11:06 AM, Tanmay Pradhantanma...@gmail.com wrote: Hi, I am using the following version of MySQL on my Mac OS X Server 10.5.8: *** Ver 14.14 Distrib

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-19 Thread Tanmay Pradhan
Pradhan, Obviously, it should fail. Since you have deleted the root user which is used by mysqldump for making connection to mysql server for taking backup Krishna CGI.COM On Tue, Oct 19, 2010 at 11:06 AM, Tanmay Pradhan tanma...@gmail.com wrote: Hi, I am using the following version

Fwd: Backing up MySQL using PHPMyAdmin problem with UTF-8

2010-10-18 Thread Tompkins Neil
MySQL Administrator 1.2.15 is fails with the same problem. Do anyone have any other suggestions ? -- Forwarded message -- From: Tompkins Neil neil.tompk...@googlemail.com Date: Fri, Oct 15, 2010 at 11:21 AM Subject: Re: Backing up MySQL using PHPMyAdmin problem with UTF-8

mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-18 Thread Tanmay Pradhan
Hi, I am using the following version of MySQL on my Mac OS X Server 10.5.8: *** Ver 14.14 Distrib 5.4.1-beta, for apple-darwin9.5.0 (i386) using readline 5.1 *** In order to restrict root account login from localhost only, I did the following: mysql DELETE FROM user WHERE user = 'root' AND host

Re: Backing up MySQL using PHPMyAdmin problem with UTF-8

2010-10-15 Thread Tompkins Neil
dump at the console. PHP does not deal with UTF very well. - michael dykman On Thu, Oct 14, 2010 at 5:48 AM, Tompkins Neil neil.tompk...@googlemail.com wrote: Hi, I'm using PHP MyAdmin to backup my MySQL database. The database is of type InnoDB and encoding used is utf8_unicode_ci

Re: Backing up MySQL using PHPMyAdmin problem with UTF-8

2010-10-15 Thread Tompkins Neil
I managed to use the older version of MySQL Administrator 1.2.15 and it appears to back up find using InnoDB online backup. On Thu, Oct 14, 2010 at 6:56 PM, Michael Dykman mdyk...@gmail.com wrote: I have had this problem with PHPMyAdmin many times, and the only way I know around it, is to go

Backing up MySQL using PHPMyAdmin problem with UTF-8

2010-10-14 Thread Tompkins Neil
Hi, I'm using PHP MyAdmin to backup my MySQL database. The database is of type InnoDB and encoding used is utf8_unicode_ci. The variables are set as follows : *MySQL connection collation: **utf8_unicode_ci* *MySQL charset: **UTF-8 Unicode (utf8)* *character set client: utf8* *character set

Re: Backing up MySQL using PHPMyAdmin problem with UTF-8

2010-10-14 Thread Michael Dykman
I have had this problem with PHPMyAdmin many times, and the only way I know around it, is to go in and do your dump at the console. PHP does not deal with UTF very well. - michael dykman On Thu, Oct 14, 2010 at 5:48 AM, Tompkins Neil neil.tompk...@googlemail.com wrote: Hi, I'm using PHP

RE: How to dump MySQL data on remote server using mysqldump

2010-09-02 Thread Rolando Edwards
redwa...@logicworks.net http://www.linkedin.com/in/rolandoedwards -Original Message- From: James Corteciano [mailto:ja...@linux-source.org] Sent: Thursday, September 02, 2010 1:19 AM To: mysql@lists.mysql.com Subject: How to dump MySQL data on remote server using mysqldump Hi, I have mysql

Re: How to dump MySQL data on remote server using mysqldump

2010-09-02 Thread Johan De Meersman
probably found a loophole that allows you do do serverside dumps remotely using mysqldump :-) Given that this is not what you intended, I suggest you either remove the -T and get SQL-format dumps; or go through the documentation again and find another way to do what you want :-) -- Bier met

Re: How to dump MySQL data on remote server using mysqldump

2010-09-02 Thread Jangita
On 02/09/2010 7:19 a, James Corteciano wrote: How could I put the dump data on web server and not the local disk on mysql server? Log into the web server and do it from there? or copy the file onto the web server? -- Jangita | +256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita |

How to dump MySQL data on remote server using mysqldump

2010-09-01 Thread James Corteciano
Hi, I have mysql server separated from web server. My problem is, when I dump the data from database using the command mysqldump -uuser -p -h mysql_server -t -T /tmp/dbname database_name on web server, all data were dumped to the /tmp/dbname of mysql server and not inside of web server. [web

Re: Fixture List generation using MySQL

2010-08-20 Thread Tompkins Neil
. Regards, Gavin Towey -Original Message- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Thursday, August 19, 2010 10:07 AM To: [MySQL] Subject: Re: Fixture List generation using MySQL I'm looking at a routine / script to create the fixtures like team 1 vs team 2 team

Re: Fixture List generation using MySQL

2010-08-20 Thread Neil Tompkins
... itchy trigger finger. - Original Message - From: Gavin Towey gto...@ffn.com To: Tompkins Neil neil.tompk...@googlemail.com; [MySQL] mysql@lists.mysql.com Sent: Thursday, August 19, 2010 1:50 PM Subject: RE: Fixture List generation using MySQL That's almost a cartesean product

Fixture List generation using MySQL

2010-08-19 Thread Tompkins Neil
Hi, I'm tasked with generating a list of fixtures from a table of teams, whereby each team plays each other home and away. Does anyone have any experience generating such information using MySQL ? Thanks for any input. Regards Neil

Re: Fixture List generation using MySQL

2010-08-19 Thread Peter Brawley
I'm tasked with generating a list of fixtures from a table of teams, whereby each team plays each other home and away. Does anyone have any experience generating such information using MySQL ? Basically ... select a.id,b.id from tbl a join tbl b on a.idb.id; union select a.id,b.id from tbl

Re: Fixture List generation using MySQL

2010-08-19 Thread Tompkins Neil
team plays each other home and away. Does anyone have any experience generating such information using MySQL ? Basically ... select a.id,b.id from tbl a join tbl b on a.idb.id; union select a.id,b.id from tbl a join tbl b on a.idb.id; PB - On 8/19/2010 9:12 AM, Tompkins Neil wrote

Re: Fixture List generation using MySQL

2010-08-19 Thread Peter Brawley
such information using MySQL ? Basically ... select a.id,b.id from tbl a join tbl b on a.idb.id; union select a.id,b.id from tbl a join tbl b on a.idb.id; PB - On 8/19/2010 9:12 AM, Tompkins Neil wrote: Hi, I'm tasked with generating a list of fixtures from a table of teams, whereby each team

RE: Fixture List generation using MySQL

2010-08-19 Thread Gavin Towey
team. Regards, Gavin Towey -Original Message- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Thursday, August 19, 2010 10:07 AM To: [MySQL] Subject: Re: Fixture List generation using MySQL I'm looking at a routine / script to create the fixtures like team 1 vs team 2

Re: Fixture List generation using MySQL

2010-08-19 Thread burhan . khalid
generation using MySQL I'm looking at a routine / script to create the fixtures like team 1 vs team 2 team 3 vs team 4 team 5 vs team 6 etc Build the script round the query. PB - On 8/19/2010 12:07 PM, Tompkins Neil wrote: I'm looking at a routine / script to create the fixtures like team 1

Re: Fixture List generation using MySQL

2010-08-19 Thread Carl
...@googlemail.com; [MySQL] mysql@lists.mysql.com Sent: Thursday, August 19, 2010 1:50 PM Subject: RE: Fixture List generation using MySQL That's almost a cartesean product; except you just want to eliminate results where a team would be paired up with itself. create table teams ( id serial

Re: Slow query using string operator

2010-08-11 Thread Joerg Bruehe
using string operator I'm running a set of queries that look like this: [[...]] SELECT feed_new.new_title AS `New Title FROM Feed`, prod.prod_pub_prod_id AS `Lib Code FROM DB`, prod.prod_title AS `Title FROM DB`, prod.prod_num AS `Prod Num

RE: Slow query using string operator

2010-08-11 Thread Jerry Schwartz
-Original Message- From: Travis Ard [mailto:travis_...@hotmail.com] Sent: Tuesday, August 10, 2010 6:53 PM To: 'Jerry Schwartz'; mysql@lists.mysql.com Subject: RE: Slow query using string operator Can you create a second, indexed column in your feed_new temp table that includes the title

RE: Slow query using string operator

2010-08-11 Thread Jerry Schwartz
IF EXISTS feed_new; CREATE TEMPORARY TABLE feed_new ( new_title VARCHAR(255), PRIMARY KEY (new_title), new_title_truncated VARCHAR(255), INDEX (new_title_truncated) ); # The next line loads up dummy data, but it looks like # what I'm really using. INSERT IGNORE

Slow query using string operator

2010-08-10 Thread Jerry Schwartz
: NULL rows: 1 Extra: Using index *** 2. row *** id: 1 select_type: SIMPLE table: prod type: ref possible_keys: pub_id,pub_id_2 key: pub_id key_len: 48 ref: const rows: 11040

RE: Slow query using string operator

2010-08-10 Thread Travis Ard
Schwartz [mailto:je...@gii.co.jp] Sent: Tuesday, August 10, 2010 3:39 PM To: mysql@lists.mysql.com Subject: Slow query using string operator I'm running a set of queries that look like this: === SET @PUBID = (SELECT pub_id FROM pub WHERE pub_code = 'DC'); DROP TEMPORARY TABLE

Re: Insert blob data using prepared statements

2010-08-07 Thread Shawn Green (MySQL)
On 7/26/2010 2:30 AM, Manasi Save wrote: Hi All, I need to insert Blob data in my table using prepared statements. But Whenever I try to insert it using prepared statement it is giving me mysql syntax error. Here's the prepared statement :- SET @stmt = Concat(Insert into ',mydb,'.MyTable

Re: Variable Expansion Using MySQL Client and .sql Files

2010-07-30 Thread Todd E Thomas
Simple - brilliant. I've modified to cat a temporary script... 1) cat the file as suggested: cat ~/payload/scripts/create_mysqldb.sql EOF ###--- ### Display the current user ###--- create database puppet; ###--- ### Display all default accounts ###--- USE puppet; ###--- ### Remove

Variable Expansion Using MySQL Client and .sql Files

2010-07-29 Thread Todd E Thomas
Hey all, I've found many packages that sit on top of MySQL for various clients. For the purposes of consistency I'd like to automate these installs. I've been directed towards using .sql files and they work great. The trouble I'm having now is that I would like to secure the installation

RE: Variable Expansion Using MySQL Client and .sql Files

2010-07-29 Thread Travis Ard
...@ssiresults.com To: mysql@lists.mysql.com Subject: Variable Expansion Using MySQL Client and .sql Files Hey all, I've found many packages that sit on top of MySQL for various clients. For the purposes of consistency I'd like to automate these installs. I've been directed towards using .sql files

Insert blob data using prepared statements

2010-07-26 Thread Manasi Save
Hi All, I need to insert Blob data in my table using prepared statements. But Whenever I try to insert it using prepared statement it is giving me mysql syntax error. Here's the prepared statement :- SET @stmt = Concat(Insert into ',mydb,'.MyTable(MyData, MyID) Select ','"',Inpu

Benetl, a free ETL tool for files using mySQL, is out in version 3.5.

2010-06-19 Thread Benoît Carpentier
Dear all, Benetl, a free ETL tool for files using mySQL, is out in version 3.5. You can freely download it at: www.benetl.net This version brings bugs correction and if operator for conditions in part formula. You should update. You can learn more about ETL tools at: http://en.wikipedia.org

Re: Slow when using sub-query

2010-06-03 Thread Johan De Meersman
key: pub_id key_len: 48 ref: const rows: 1543 Extra: Using where; Using temporary; Using filesort === Outer Query without Inner Query === us-gii SELECT prod_num FROM prod - WHERE pub_id = @P - AND prod_pub_prod_id IN - ( - NULL

RE: Slow when using sub-query

2010-06-03 Thread Jerry Schwartz
-Original Message- From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De Meersman Sent: Thursday, June 03, 2010 6:52 AM To: je...@gii.co.jp Cc: mysql@lists.mysql.com Subject: Re: Slow when using sub-query The short answer is that the optimizer is amazingly stupid

Slow when using sub-query

2010-06-02 Thread Jerry Schwartz
,pub_id_2 key: pub_id key_len: 48 ref: const rows: 1543 Extra: Using where; Using temporary; Using filesort === Outer Query without Inner Query === us-gii SELECT prod_num FROM prod - WHERE pub_id = @P - AND prod_pub_prod_id IN - ( - NULL

using a count function

2010-05-29 Thread Chris Elhardt
This is probably pretty obvious to everyone except me. I have a couple of columns, DateOfInterview and DateOfBirth in a table named Demographics For a monthly report I have a script where the operator enters the start and end dates of the reporting period. I need a query result with

Re: using a count function

2010-05-29 Thread mos
Chris, You are using Count when you should be using Sum. Here is a solution you can try: SELECT SUM(IF(DATEDIFF(dateofinterview,dateofbirth)/365.25 BETWEEN 0 AND 18.999, 1,0)) AS 18 and Under, SUM(IF(DATEDIFF(dateofinterview,dateofbirth)/365.25 BETWEEN 19 AND 65.999

Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Andre Matos
Hi All, I have a table that uses auto_increment to generate the Id automatically working fine. However, I need to create a new table where the Id must be a number generated randomly, so I cannot use the auto_increment. MySQL has a function RAND. So I could use something like this: SELECT

Re: Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Jim Lyons
If your specs are that specific (IDs must be between 1 and 99) then you could create a 99-row table with one integer column and prefill it with the numbers 1 to 99 in random order. Then you could write a function that would select and return the first number in the table, then delete

RE: Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Steven Staples
-Original Message- From: Jim Lyons [mailto:jlyons4...@gmail.com] Sent: May 28, 2010 11:49 AM To: Andre Matos Cc: mysql@lists.mysql.com Subject: Re: Using RAND to get a unique ID that has not been used yet If your specs are that specific (IDs must be between 1 and 99) then you could create

Re: Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Andre Matos
[mailto:jlyons4...@gmail.com] Sent: May 28, 2010 11:49 AM To: Andre Matos Cc: mysql@lists.mysql.com Subject: Re: Using RAND to get a unique ID that has not been used yet If your specs are that specific (IDs must be between 1 and 99) then you could create a 99-row table with one integer

RE: Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Jerry Schwartz
-Original Message- From: Jim Lyons [mailto:jlyons4...@gmail.com] Sent: Friday, May 28, 2010 11:49 AM To: Andre Matos Cc: mysql@lists.mysql.com Subject: Re: Using RAND to get a unique ID that has not been used yet If your specs are that specific (IDs must be between 1 and 99) then you

RE: Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Jerry Schwartz
-Original Message- From: Andre Matos [mailto:andrema...@mineirinho.org] Sent: Friday, May 28, 2010 1:44 PM To: Steven Staples Cc: mysql@lists.mysql.com Subject: Re: Using RAND to get a unique ID that has not been used yet It seems to be a good approach, although I was trying to get

Re: Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Andre Matos
...@mineirinho.org On 2010-05-28, at 1:51 PM, Jerry Schwartz wrote: -Original Message- From: Andre Matos [mailto:andrema...@mineirinho.org] Sent: Friday, May 28, 2010 1:44 PM To: Steven Staples Cc: mysql@lists.mysql.com Subject: Re: Using RAND to get a unique ID that has

Re: Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Perrin Harkins
. You'd be better off using UUID in my opinion. - Perrin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Using RAND to get a unique ID that has not been used yet

2010-05-28 Thread Kevin (Gmail)
it might speed up as the used rows are progressively deleted). It has the advantage that the random function is called only once: whereas using a single table requires looping until a unique random value is found, and as the table fills this will get really slow. - Original Message

Re: Slow query using string functions

2010-05-27 Thread Joerg Bruehe
Hi! Jerry Schwartz wrote: I have a pretty simple query that seems to take a lot longer than it ought to (over 2 minutes). [[...]] SELECT feed_new.new_title AS `New Title FROM Feed`, prod.prod_pub_prod_id AS `Lib Code FROM DB`, prod.prod_title AS `Title FROM DB`,

Re: Slow query using string functions

2010-05-27 Thread Baron Schwartz
Jerry, On Wed, May 26, 2010 at 5:13 PM, Jerry Schwartz je...@gii.co.jp wrote: I have a pretty simple query that seems to take a lot longer than it ought to (over 2 minutes). I suspect that if you watch Handler_ stats, you'll find that the EXPLAIN estimate is wrong for some reason and it's

RE: Slow query using string functions

2010-05-27 Thread Jerry Schwartz
-Original Message- From: Gavin Towey [mailto:gto...@ffn.com] Sent: Wednesday, May 26, 2010 7:39 PM To: je...@gii.co.jp; mysql@lists.mysql.com Subject: RE: Slow query using string functions Jerry, Are you sure this is really your explain plan for this query? That's not at all what I

RE: Slow query using string functions

2010-05-27 Thread Jerry Schwartz
/ FAX: 860.674.8341 www.the-infoshop.com -Original Message- From: baron.schwa...@gmail.com [mailto:baron.schwa...@gmail.com] On Behalf Of Baron Schwartz Sent: Thursday, May 27, 2010 9:09 AM To: MySql Subject: Re: Slow query using string functions Jerry, On Wed, May 26, 2010 at 5:13 PM

Slow query using string functions

2010-05-26 Thread Jerry Schwartz
: feed_new type: index possible_keys: NULL key: new_title key_len: 768 ref: NULL rows: 1 Extra: Using index *** 2. row *** id: 1 select_type: SIMPLE table: prod type: ref

RE: Slow query using string functions

2010-05-26 Thread Gavin Towey
using string functions I have a pretty simple query that seems to take a lot longer than it ought to (over 2 minutes). Table `feed_new` has a single VARCHAR(255) column, `new_title`, that is an index. Table `prod` has many fields: `prod_title` and `pub_id` are both indexes (VARCHAR). `feed_new

How to put table definition into another table using SQL?

2010-05-11 Thread mos
I'd like to get the field names and data types of a table, say TableX, and put it into TableDef using nothing but SQL. I know I can list the table definition using Describe Table and then loop through the results and insert the first two columns Field and Type into TableDef, but is there a way

Re: How to put table definition into another table using SQL?

2010-05-11 Thread Nuno Tavares
create table TableDef like TableX ? -- Nuno Tavares DRI, Consultoria Informática Telef: +351 936 184 086 mos escreveu: I'd like to get the field names and data types of a table, say TableX, and put it into TableDef using nothing but SQL. I know I can list the table definition using

Re: How to put table definition into another table using SQL?

2010-05-11 Thread Phil
create table TableDEF like TableX; Or am I missing something ?? On Tue, May 11, 2010 at 11:36 AM, mos mo...@fastmail.fm wrote: I'd like to get the field names and data types of a table, say TableX, and put it into TableDef using nothing but SQL. I know I can list the table definition using

Re: How to put table definition into another table using SQL?

2010-05-11 Thread Anirudh Sundar
mo...@fastmail.fm wrote: I'd like to get the field names and data types of a table, say TableX, and put it into TableDef using nothing but SQL. I know I can list the table definition using Describe Table and then loop through the results and insert the first two columns Field and Type

Re: How to put table definition into another table using SQL?

2010-05-11 Thread mos
it into TableDef using nothing but SQL. I know I can list the table definition using Describe Table and then loop through the results and insert the first two columns Field and Type into TableDef, but is there a way to do it using just SQL? Example: Describe TableX: First_Name Char(15

Re: How to put table definition into another table using SQL?

2010-05-11 Thread Carlos Proal
using nothing but SQL. I know I can list the table definition using Describe Table and then loop through the results and insert the first two columns Field and Type into TableDef, but is there a way to do it using just SQL? Example: Describe TableX: First_Name Char(15) Last_Name

Re: How to put table definition into another table using SQL?

2010-05-11 Thread Anirudh Sundar
using nothing but SQL. I know I can list the table definition using Describe Table and then loop through the results and insert the first two columns Field and Type into TableDef, but is there a way to do it using just SQL? Example: Describe TableX: First_Name Char(15) Last_Name

Re: How to put table definition into another table using SQL?

2010-05-11 Thread mos
the field names and data types of a table, say TableX, and put it into TableDef using nothing but SQL. I know I can list the table definition using Describe Table and then loop through the results and insert the first two columns Field and Type into TableDef, but is there a way to do it using

Using a join-table twice in one query

2010-04-28 Thread Tom Worster
to a). Saying it in two sentences: Find the set Bx of rows in b joined to rows in a that meet x. Now select a table of all joined a/b rows where the b rows are in set Bx. Using an IN-subquery to mimic the two-sentence formulation was very slow, as the manual warns it can be: SELECT ... FROM b INNER

Finding the max integer using MySQL.

2010-04-20 Thread Alister West
Hi there, I would like to find out the maximum (signed or unsigned) integer from MySQL. SELECT CAST( POW(2,100) as UNSIGNED) as max_int; # max_int | 9223372036854775808 This seems to be a MAX_BIGINT from the lookup table at http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html Is there a

Slow queries when using left join

2010-03-19 Thread Olav Mørkrid
Dear MySQL forum. I have performance problems when using left join x combined with where x.y is null, in particularily when combining three tables this way. Please contact me by e-mail if you are familiar with these issues and know how to eliminate slow queries. I would really appreciate your

Re: Slow queries when using left join

2010-03-19 Thread Johan De Meersman
2010/3/19 Olav Mørkrid olav.mork...@gmail.com Dear MySQL forum. I have performance problems when using left join x combined with where x.y is null, in particularily when combining three tables this way. With a left join, particularly when you're using *is (not) null*, you can't use index

Re: Using symlinks for database creation in mysql

2010-02-25 Thread Baron Schwartz
Hi, On Mon, Feb 22, 2010 at 10:40 AM, Johan De Meersman vegiv...@tuxera.be wrote: I don't think using a dot is a good idea - that's the table.field separator. Right. Even if mysqld didn't complain about the directory name, just try using a '.' character in an identifier. It's a syntax error

Re: Using symlinks for database creation in mysql

2010-02-22 Thread Johan De Meersman
I don't think using a dot is a good idea - that's the table.field separator. On Fri, Feb 19, 2010 at 12:41 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Hi Johan, Some time back you have solved my problem of creating symlink as database was fixed. But now When I am putting

Re: Using symlinks for database creation in mysql

2010-02-19 Thread Manasi Save
Hi Johan, Some time back you have solved my problem of creating symlink as database was fixed. But now When I am putting special characters in symlinks like . it is not readable as database. If I am creating database with special characters from mysql command line I can create it but an

Re: Using symlinks for database creation in mysql

2010-02-19 Thread Manasi Save
Hi All, When I am creating a symlink with a special character in database name it appears in mysql as somthing like this #mysql50#dbname. For Ex:- I have created a symlink in mysql data directory named User.Name which appeared to me in mysql command line client as #mysql50#User.Name Can

RE: Using symlinks for database creation in mysql

2010-02-19 Thread Daevid Vincent
Why are you using special characters!? You're just asking for trouble. Just use letters, numbers, underscores for database names, table names and column names. In fact, you should probably use lowercase as well. http://www.learn-mysql-tutorial.com/Identifiers.cfm http://dev.mysql.com/doc/refman

dynamic sql using INTO

2010-02-17 Thread Cantwell, Bryan
I have a function built that will get me X percentile from my history table for last X days. It works fine as long as I hard code the certain values in where they go... what I really need to know is how can I make dynamic sql still do a select into a variable? simply replacing the '31' below

Re: Using symlinks for database creation in mysql

2010-01-29 Thread Johan De Meersman
Given that you're talking about quite a few folders, I think it'd be good to check up on the theoretical and practical limits for your filesystem of choice, though - ext2 for example starts getting noticeably slower when you have a lot more than 10.000 entries in the same directory. One way of

Using symlinks for database creation in mysql

2010-01-28 Thread Manasi Save
Hi All,I am creating symlinks as database.I have mysql data directory created on /var/lib/mysql/databasename.on the same path I am creating /var/lib/mydatabaseand creating symlink from/var/lib/mydatabase to /var/lib/mysql/databasenamewill there any performance issues as there will be quite a few

Re: Using symlinks for database creation in mysql

2010-01-28 Thread Suresh Kuna
Not a problem as you are doing it from a whole data directory. Thanks Suresh Kuna MySQL DBA On Fri, Jan 29, 2010 at 11:56 AM, Manasi Save manasi.s...@artificialmachines.com wrote: Hi All, I am creating symlinks as database. I have mysql data directory created on

Re: Using symlinks for database creation in mysql

2010-01-28 Thread prabhat kumar
I don't agree, Don't have any specific documents but seems to make a bit of sense to me. Opening a file that is a symbolic link takes more time than one that isn't as you need to do more operations. Search the directory for the symbolic link, open it (probably, though an inode look up might be

Re: Using symlinks for database creation in mysql

2010-01-28 Thread prabhat kumar
And, IF the application uses the file a lot, but opens it infrequently, for example an MySQL data file, then the incremental cost is truly neglectable. IF the symlink is looked up and followed frequently then caches will make it neglectable. IF the application touches a wide range (hundreds of

RE: When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-18 Thread Gavin Towey
-Original Message- From: phark...@gmail.com [mailto:phark...@gmail.com] On Behalf Of Perrin Harkins Sent: Friday, January 15, 2010 6:08 AM To: Johan Machielse Cc: Baron Schwartz; mysql@lists.mysql.com Subject: Re: When using FOR UPDATE whole the table seems to lock instead of selected row

Re: When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-15 Thread Perrin Harkins
are being locked. That's an internal implementation issue, but you may be able to change it by adjusting which columns have indexes and keeping your statistics up to date. Or there may not be enough cardinality on the column you're using in the query to lock specific rows. Using EXPLAIN

When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-14 Thread Johan Machielse
Hi, I have created a query to read and update a stock item by using the FOR UPDATE statement. According to the MySql documention only the rows that are selected using the FOR UPDATE should be locked for other sessions, but somehow whole the table is locked. This post gives some general

Re: When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-14 Thread Baron Schwartz
Johan, I don't see a valid need for using FOR UPDATE here. In fact, FOR UPDATE is the cause of many grievances, and I would advise you to avoid it by any means possible. Among other things, it will cause serious performance problems when your server gets busy. And as you can see, it's hard

Re: When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-14 Thread Johan Machielse
such a problem? Thank you in advance. Regards, Johan Machielse - Original Message - From: Baron Schwartz ba...@xaprb.com To: Johan Machielse johan.machie...@kpnplanet.nl Cc: mysql@lists.mysql.com Sent: Friday, January 15, 2010 3:14 AM Subject: Re: When using FOR UPDATE whole the table

Re: Benetl, a free ETL tool for files using MySQL, is out in version 3.3

2010-01-01 Thread benoît carpentier
Dear all, Benetl, a free ETL tool for files using MySQL, is out in version 3.3. You can freely download it at: www.benetl.net This version brings two new improvements, you should update. You can learn more about ETL tools at: http://en.wikipedia.org/wiki/Extract,_transform,_load Thanks

Re: Join using Table1 or Table2 - depending on content of rel table

2009-12-17 Thread Shawn Green
Miguel Vaz wrote: Hi, How would one go about doing this: - I have 3 tables: - A relationship table(REL), then TABLE1 and TABLE2: REL TABLE has fields: . ID . TYPE - type of event . ID_EVENT - id of event, but this id will either point to TABLE1 or TABLE2, depending on the content of the

Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10

2009-12-16 Thread Walton Hoops
Hi all. I am running into a very frustrating problem trying to created a stored procedure. I had originally assumed I was using bad syntax, but even examples copied and pasted directly from the manual are giving the same error. mysql CREATE DEFINER = 'walton'@'localhost' PROCEDURE

RE: Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10

2009-12-16 Thread Gavin Towey
-Original Message- From: Walton Hoops [mailto:wal...@vyper.hopto.org] Sent: Wednesday, December 16, 2009 10:46 AM To: mysql@lists.mysql.com Subject: Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10 Hi all. I am running into a very frustrating

RE: Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10

2009-12-16 Thread Walton Hoops
-Original Message- From: Walton Hoops [mailto:wal...@vyper.hopto.org] Hi all. I am running into a very frustrating problem trying to created a stored procedure. I had originally assumed I was using bad syntax, but even examples copied and pasted directly from the manual

Join using Table1 or Table2 - depending on content of rel table

2009-12-13 Thread Miguel Vaz
Hi, How would one go about doing this: - I have 3 tables: - A relationship table(REL), then TABLE1 and TABLE2: REL TABLE has fields: . ID . TYPE - type of event . ID_EVENT - id of event, but this id will either point to TABLE1 or TABLE2, depending on the content of the field TYPE Is it

login problem from django script, using python2.5/MySQLdb/connections.py

2009-12-09 Thread John Griessen
If I can login from a shell, what could stop a script from login? I'm following a newbie tutorial for django, a web content mgt. system. The following user and password are good if I use them fromthe same shell the script launches from. Here's the error message from a django script using

Re: login problem from django script, using python2.5/MySQLdb/connections.py

2009-12-09 Thread John Griessen
John Griessen wrote: If I can login from a shell, what could stop a script from login? privileges were stopping it and at first, maybe a mistake in GRANT setup of a new user. Nevermind JG -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: login problem from django script, using python2.5/MySQLdb/connections.py

2009-12-09 Thread Gavin Towey
Access Denied means you're using an incorrect username and password combination. Test your credentials using the mysql cli. You can log in as root to mysql to make changes as necessary, or supply the correct user/pass from your script. Regards, Gavin Towey -Original Message- From

Re: How to Backup the Database using Script

2009-10-29 Thread Scott Haneda
, Ganeswar Mishra wrote: Hi Everyone, I am trying to backup a database regularly, without using Administrator tool in mysql, Can anyone help to write a scipt regarding backup database. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

How to Backup the Database using Script

2009-10-28 Thread Ganeswar Mishra
Hi Everyone, I am trying to backup a database regularly, without using Administrator tool in mysql, Can anyone help to write a scipt regarding backup database. -Thanks in Advance Ganeswar

RE: Using IF in a query to set a variable then sort on said variable

2009-10-26 Thread Jeff
originally wanted to use mySQL as the part that did this processing as opposed to outputting the results then sorting an array. Jeff From: 卢钧轶 [mailto:cenal...@gmail.com] Sent: Sunday, October 25, 2009 1:19 AM To: Jeff Subject: Re: Using IF in a query to set a variable then sort on said variable

Re: Using IF in a query to set a variable then sort on said variable

2009-10-26 Thread Jaime Crespo Rincón
2009/10/26 Jeff j...@platinumsynergy.com: Perhaps case is the way to go, I'll look into that this morning. Unfortunately there are three groupings. So my IF or CASE needs to check for example: if timezone = 3,5,6,7 then 1 if timezone = 1,2,4 then 2 if timezone = 8,9 then 3 Yes, Case

RE: Using IF in a query to set a variable then sort on said variable

2009-10-26 Thread Jeff
To: Jeff Cc: mysql@lists.mysql.com Subject: Re: Using IF in a query to set a variable then sort on said variable 2009/10/26 Jeff j...@platinumsynergy.com: Perhaps case is the way to go, I'll look into that this morning. Unfortunately there are three groupings. So my IF or CASE needs to check

<    1   2   3   4   5   6   7   8   9   10   >