Re: How to Optimize distinct with index

2009-06-18 Thread Dan Nelson
Please don't change the subject on someone else's thread. Next time, post a new message instead of hitting "reply" on an unrelated message. In the last episode (Jun 19): > Hi, > I have a sql : > Select distinct user_id from user where key1=value and > key2=value2 and key3=va

How to Optimize distinct with index

2009-06-18 Thread 周彦伟
Hi, I have a sql : Select distinct user_id from user where key1=value and key2=value2 and key3=value2; I add index on (key1,key2,key3,user_id), this sql use temporary table howevery I have thousands of queries per second. How to optimize it? Anthoer question: Select * fr

Re: Half Hour Sub-query in MySQL vs. 5 Seconds in VFP?

2009-06-18 Thread Johnny Withers
I often find doing the IN (subquery...) is really slow versus doing a join: SELECT cutzip FROM customers INNER JOIN zipcodes ON customers.zipcode=zipcodes.zip WHERE degrees(acos(sin(radians(39.0788994)) * sin(radians(latitude)) + cos(radians(39.0788994)) * cos(radians(latitude)) * cos(radians(-77.

Half Hour Sub-query in MySQL vs. 5 Seconds in VFP?

2009-06-18 Thread Matt Neimeyer
I'm converting a PHP app from using Visual FoxPro as the database backend to using MySQL as the backend. I'm testing on MySQL 4.1.22 on Mac OSX 10.4. The end application will be deployed cross platform and to both 4.x and 5.x MySQL servers. This query returned 21 records in .27 seconds. SELECT

Re: ndbcluster problem

2009-06-18 Thread sangprabv
That 108 is the total number of records. This caused by the DataMemory directive in the config and I must increase the value. Willy On Thu, 2009-06-18 at 14:10 -0400, Mike OK wrote: > Have you checked the type of column you are using. Depending on what the > 108 number means, it cou

Re: ndbcluster problem

2009-06-18 Thread Mike OK
Have you checked the type of column you are using. Depending on what the 108 number means, it could be altering the table to say int or bigint column. If it means total number of records, it does not seem to correspond to a medint value, either signed or not. If it means the record number

ndbcluster problem

2009-06-18 Thread sangprabv
Is there any record limitation in ndbcluster? Because I can't insert more records after it reached 108 records. How to solve this? Willy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

RE: How to specify CHAR column to accept specific characters

2009-06-18 Thread Jerry Schwartz
>-Original Message- >From: hezjing [mailto:hezj...@gmail.com] >Sent: Thursday, June 18, 2009 5:04 AM >To: mysql@lists.mysql.com >Subject: How to specify CHAR column to accept specific characters > >Hi >I'm using MySQL 5.1. > >How do we create a constraint on char column to accept only chara

Re: myisamchk buffer_size warnings

2009-06-18 Thread Thomas Spahni
On Tue, 16 Jun 2009, Thomas Spahni wrote: Hi I have MySQL 5.0.64 compiled from source. When I run myisamchk on any table I get the following warnings: Warning: option 'key_buffer_size': unsigned value 18446744073709551615 adjusted to 4294963200 Warning: option 'read_buffer_size': unsigned val

Re: How to specify CHAR column to accept specific characters

2009-06-18 Thread Martijn Tonies
Hi, I'm using MySQL 5.1. How do we create a constraint on char column to accept only character 'A' - 'Z'? MySQL doesn't have CHECK constraints, I think the only way to do this is via a BEFORE INSERT trigger. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download

How to specify CHAR column to accept specific characters

2009-06-18 Thread hezjing
Hi I'm using MySQL 5.1. How do we create a constraint on char column to accept only character 'A' - 'Z'? Thank you! -- Hez