MySQL Master and Slave Database Server

2008-04-11 Thread Kaushal Shriyan
Hi, what are the different test cases to test MySQL Master and Slave Replication Database Server. Thanks and Regards Kaushal

Re: MySQL 5.0.51a and SHOW ENGINES

2008-04-11 Thread Martijn Tonies
Hello Jim, On Thu, Apr 10, 2008 at 09:32:43AM +0200, Martijn Tonies wrote: It seems that SHOW ENGINES fails on MySQL 5.0.51a (community edition checked). Instead of returning the full data, the first two columns are cut off at 3 characters, while the comment column is cut off at 26

Data transfer

2008-04-11 Thread Krishna Chandra Prajapati
Hi, What ever queries are executed on 5 mysql server with multiple database (more than one database on each mysql server). I have to reflect all the changes on 1 mysql server (developement server for developers) Initially, I thought to take take the queries from bin-log and execute on

Two MySql servers, but very different performances for a SELECT JOIN

2008-04-11 Thread tmarly
Hi, I have 2 MySql server instances. One which is 5.0.27/Debian, another 5.0.32/Solaris. Both instances have the same data in the database. And I'm doing a select: SELECT media.* FROM media,country,content WHERE country.id='Germany' AND country.detail_tid=content.tid AND

Re: Data transfer

2008-04-11 Thread Ananda Kumar
does your development server have only one database or multiple database. regards anandkl On 4/11/08, Krishna Chandra Prajapati [EMAIL PROTECTED] wrote: Hi, What ever queries are executed on 5 mysql server with multiple database (more than one database on each mysql server). I have to

Query Confusion!

2008-04-11 Thread Barry
I am confused ( nothing new there), what I thought was a simple search is proving not to be so, Can anyone tell me why this query for the word 'plus': mysql SELECT * - FROM booktitles - WHERE MATCH (category , publisher , bookTitle , author) - AGAINST (CONVERT( _utf8'plus'USING latin1 ) - IN

RE: Data transfer

2008-04-11 Thread Muthukumar-Fijilive
HI Option 1 If you are using PHP, you can do this very simply using CRON task. Make a field for to update either your first operation is successful (eg. Update the field value to 1 ). Run a CRON job in particular interval if the field updated as 1 then call your second operation query and make

RE: Data transfer

2008-04-11 Thread Muthukumar Selvarasu
HI Option 1 If you are using PHP, you can do this very simply using CRON task. Make a field for to update either your first operation is successful (eg. Update the field value to 1 ). Run a CRON job in particular interval if the field updated as 1 then call your second operation query and make

MySQl 5.0 optimization problem

2008-04-11 Thread Victor Danilchenko
Hi, I am trying to optimize our DB server. We have one table which has 1.3M entries, and the keys are GUIDs (so the key space is large). However, I have it all indexed. The performance was iffy, though, so I increased memory allocation, and the searches on the indexed fields seem to

Re: Query runs very sloooow

2008-04-11 Thread Johan Solve
A late followup on this, so I top post to keep the history intact. The composite primary key was the problem. Or rather, the missing individual indexes for tag_id and ad_id. We also changed to INNER JOINs instead, but that didn't affect the performance. Thanks for all suggestions! On

Re: MySQl 5.0 optimization problem

2008-04-11 Thread Ben Clewett
Are you using MyIsam or InnoDB? Or something else? In either case the speed to get a COUNT() is largely down to the speed if your disks and size of disk caching. A COUNT() forces the system to read every row in order to count them, and any large table is probably larger than your caches.

Re: MySQl 5.0 optimization problem

2008-04-11 Thread Wm Mussatto
On Fri, April 11, 2008 06:47, Ben Clewett wrote: Are you using MyIsam or InnoDB? Or something else? In either case the speed to get a COUNT() is largely down to the speed if your disks and size of disk caching. A COUNT() forces the system to read every row in order to count them, and any

Why is this delete so slow? ( 90 seconds per 100 records)

2008-04-11 Thread Ryan Stille
I'm trying to delete some orphaned records from a table that has about 150K records. Here is my delete: |CREATE TEMPORARY TABLE deleteids AS ( SELECT subTable.ID from subTable LEFT OUTER JOIN parentTable ON subTable.ID = parentTable.ID WHERE parentTable.ID IS NULL ); DELETE FROM subTable

Re: MySQl 5.0 optimization problem

2008-04-11 Thread Ben Clewett
Hi, Can you please post your query? I also need to know your table type as different settings effect different table types? You are right that a SELECT COUNT(*) WHERE field = 'value' should hit the index, but does depend on your query. You might also try EXPLAIN before your query, which

Re: MySQl 5.0 optimization problem

2008-04-11 Thread Rob Wultsch
On Fri, Apr 11, 2008 at 6:47 AM, Ben Clewett [EMAIL PROTECTED] wrote: A COUNT() forces the system to read every row in order to count them... That is not strictly the case. A count(field) can use an index scan rather than a sequential scan, which may or may not be faster. Also some count(field)

Re: Why is this delete so slow? ( 90 seconds per 100 records)

2008-04-11 Thread Ryan Stille
Also the table seems to be locked while running this delete... thats not going to be very good when I need to run it on production. Is there a way to have it not be locked during this delete? I'm thinking of creating a script to delete in 10 row increments until they are all gone.

Re: Why is this delete so slow? ( 90 seconds per 100 records)

2008-04-11 Thread Rob Wultsch
On Fri, Apr 11, 2008 at 8:49 AM, Ryan Stille [EMAIL PROTECTED] wrote: I'm trying to delete some orphaned records from a table that has about 150K records. Here is my delete: |CREATE TEMPORARY TABLE deleteids AS ( SELECT subTable.ID from subTable LEFT OUTER JOIN parentTable ON

Re: Two MySql servers, but very different performances for a SELECT JOIN

2008-04-11 Thread Rob Wultsch
2008/4/11 [EMAIL PROTECTED]: Hi, I have 2 MySql server instances. One which is 5.0.27/Debian, another 5.0.32/Solaris. Both instances have the same data in the database. And I'm doing a select: SELECT media.* FROM media,country,content WHERE country.id='Germany' AND

RE: Why is this delete so slow? ( 90 seconds per 100 records)

2008-04-11 Thread Jerry Schwartz
-Original Message- From: Ryan Stille [mailto:[EMAIL PROTECTED] Subject: Re: Why is this delete so slow? ( 90 seconds per 100 records) Also the table seems to be locked while running this delete... thats not going to be very good when I need to run it on production. Is there a way to

Re: MySQl 5.0 optimization problem

2008-04-11 Thread Victor Danilchenko
First of all, my bad -- I forgot to mention that I use MyISAM. mysql show table status from example like 'leads'\G *** 1. row *** Name: leads Engine: MyISAM Version: 10 Row_format: Dynamic Rows:

Re: Why is this delete so slow? ( 90 seconds per 100 records)

2008-04-11 Thread Ryan Stille
Thanks for the help, I rewrote it as a subselect and it deleted all 10K records in two seconds. DELETE subTable FROM subTable LEFT OUTER JOIN parentTable ON subTable.parentID = parentTable.ID WHERE parentTable.ID IS NULL -Ryan -- MySQL General Mailing List For list archives:

Re: Why is this delete so slow? ( 90 seconds per 100 records)

2008-04-11 Thread Ryan Stille
Ryan Stille wrote: Thanks for the help, I rewrote it as a subselect and it deleted all 10K records in two seconds. DELETE subTable FROM subTable LEFT OUTER JOIN parentTable ON subTable.parentID = parentTable.ID WHERE parentTable.ID IS NULL -Ryan Whoops, I meant that I rewrote it as a

SQL query question for GROUP BY

2008-04-11 Thread Victor Danilchenko
Hi all, I trying to run a query where, after doing a UNION on two different SELECTs, I need to sort the result by username and log_date fields, and then grab the last entry for each username ('last' as determined by the ordering of the log_date field, which is a datetime). GROUP

����������� ����������

2008-04-11 Thread msworld
Now and then, shadow defined by necromancer find lice on dissident inside.

Re: SQL query question for GROUP BY

2008-04-11 Thread Rob Wultsch
On Fri, Apr 11, 2008 at 11:46 AM, Victor Danilchenko [EMAIL PROTECTED] wrote: GROUP BY seems like an obvious choice; 'GROUP BY username', to be exact. However, this seems to produce not the last row's values, but ones from a random row in the group. Under most databases your query is

Re: SQL query question for GROUP BY

2008-04-11 Thread Victor Danilchenko
Oooh, this looks evil. It seems like such a simple thing. I guess creating max(log_date) as a field, and then joining on it, is a solution -- but my actual query (not the abridged version) is already half a page long. I think at this point, unless someone else suggests a better solution,

Re: SQL query question for GROUP BY

2008-04-11 Thread Rob Wultsch
On Fri, Apr 11, 2008 at 1:01 PM, Victor Danilchenko [EMAIL PROTECTED] wrote: Oooh, this looks evil. It seems like such a simple thing. I guess creating max(log_date) as a field, and then joining on it, is a solution -- but my actual query (not the abridged version) is already half a

Question about mysql procedures

2008-04-11 Thread Joshua D. Drake
Hello, Can MySQL functions/stored procedures access database data? Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate

Re: Question about mysql procedures

2008-04-11 Thread Rob Wultsch
On Fri, Apr 11, 2008 at 2:15 PM, Joshua D. Drake [EMAIL PROTECTED] wrote: Hello, Can MySQL functions/stored procedures access database data? Joshua D. Drake Yes. Is there something in particular you are looking to do? -- Rob Wultsch [EMAIL PROTECTED] wultsch (aim) -- MySQL General

Re: Question about mysql procedures

2008-04-11 Thread Paul DuBois
At 2:15 PM -0700 4/11/08, Joshua D. Drake wrote: Hello, Can MySQL functions/stored procedures access database data? Yes, with some limitations. You will want to read this section to see whether what you want to do is restricted:

Re: Some way/tool to do this with database scripts backups

2008-04-11 Thread dr_pompeii
hello let me explain me more think a table how this case cliente is customer/client in english Field Type Null Key Default Extra --- --- -- -- idCliente varchar(11) NO PRI

Re: Question about mysql procedures

2008-04-11 Thread Joshua D. Drake
On Fri, 11 Apr 2008 14:52:30 -0700 Rob Wultsch [EMAIL PROTECTED] wrote: On Fri, Apr 11, 2008 at 2:15 PM, Joshua D. Drake [EMAIL PROTECTED] wrote: Hello, Can MySQL functions/stored procedures access database data? Joshua D. Drake Yes. Is there something in particular you are

' . . ' can't insert into a date field,but update can

2008-04-11 Thread wang shuming
Hi, table table1 int1 int auto_increament , date date not null default '-00-00' 1) insert into table1 (date) values('. . ') // shows Incorrect date value: '. . ' for column date' at row 1 // '. . ' == space(4)+.+space(2)+.+space(2) 2) update