how to efficiently query for the next in MySQL Community Edition 5.1.34?

2009-06-19 Thread Mike Spreitzer
Suppose I have a table T with two column, S holding strings (say, VARCHAR(200)) and I holding integers. No row appears twice. A given string appears many times, on average about 100 times. Suppose I have millions of rows. I want to make a table U holding those same columns plus one more, J

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

2009-06-19 Thread Walter Heck - OlinData.com
Peter, On Thu, Jun 18, 2009 at 9:27 PM, Peter Brawley wrote: > For explanation & alternatives see "The unbearable slowness of IN()" at > http://localhost/artful/infotree/queries.php. > you prolly meant to not post a url pointing at your local copy of your website. This works better for most of us

Setting up host password on a shared server

2009-06-19 Thread michel
I have MySQL set up and running, but I am under the impression that I am unable to password protect it properly because I can't protect it as root user. From what I've been reading I should be setting it up as mysqladmin -u root password _thepassword_ But with phpMyAdmin I can still log in as

Master-Master Replication Problem

2009-06-19 Thread sangprabv
I have configured 2 MySQL server to do master-master replication. Below is my config: Node A server-id = 1 log_bin = mysql-bin expire_logs_days= 10 max_binlog_size = 100M binlog_do_db= clustertest binlog_do_db= gateway binlog_do_

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

2009-06-19 Thread Peter Brawley
Matt, This query is still running half an hour later, with a Time of 2167 and a State of "Sending Data" (according to the mysql process list) SELECT custzip FROM customers WHERE custzip IN ( ... For explanation & alternatives see "The unbearable slowness of IN()" at http://localhost/artful/

Re: Duplicate key name when importing mysql dump file

2009-06-19 Thread ars k
Hi Jason, You may have to run "ANALYZE TABLE.." for the particular table for which you are facing the error. So it'll rebuild the indexes. This would be the best one to save your data. We can use the method which Mr.Isart suggested, but it'll ignore the error and also will lead to data loss. Rega

Re: Duplicate key name when importing mysql dump file

2009-06-19 Thread Isart Montane
Hi Jason, if you run mysql with -f it will ignore any errors and continue importing cat aac.sql | mysql -f -u root AAC Isart On Wed, Jun 17, 2009 at 8:59 PM, Jason Novotny wrote: > Hi, > > I'm trying to import a dumpfile like so: > > cat aac.sql | mysql -u root AAC > > It all runs fine unti

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

2009-06-19 Thread Brent Baisley
It sounds like you want to use spatial indexes, but they only became available in v4.1 http://dev.mysql.com/doc/refman/5.0/en/create-index.html http://dev.mysql.com/doc/refman/5.0/en/using-a-spatial-index.html You would need to switch your table type from InnoDB to MyISAM, which is fairly easy wit

Re: safe query prevent sites from hijacker

2009-06-19 Thread bharani kumar
yes am using PHP , On Fri, Jun 19, 2009 at 7:59 PM, Darryle Steplight wrote: > Of course I'm assuming you are using PHP. > > On Fri, Jun 19, 2009 at 10:28 AM, Darryle Steplight > wrote: > > "pull the plug for the mains and save energy.". It's still early, but > > it was only a matter of time bef

Re: safe query prevent sites from hijacker

2009-06-19 Thread Darryle Steplight
Of course I'm assuming you are using PHP. On Fri, Jun 19, 2009 at 10:28 AM, Darryle Steplight wrote: > "pull the plug for the mains and save energy.". It's still early, but > it was only a matter of time before people on this list start typing > what I was thinking. But for starter, check out http

Re: safe query prevent sites from hijacker

2009-06-19 Thread Darryle Steplight
"pull the plug for the mains and save energy.". It's still early, but it was only a matter of time before people on this list start typing what I was thinking. But for starter, check out http://shiflett.org/ and read his Essential PHP Security book. On Fri, Jun 19, 2009 at 10:03 AM, walter harms w

Re: How to Optimize distinct with index

2009-06-19 Thread Darryle Steplight
Select user_id from user where key1=value and key2=value2 and key3=value2 GROUP BY user_id is faster than Select distinct user_id from user where key1=value and key2=value2 and key3=value2; 2009/6/18 周彦伟 : > Hi, >I have a sql : >Select distinct user_id from user where

Re: safe query prevent sites from hijacker

2009-06-19 Thread walter harms
bharani kumar schrieb: > Hi All , > This is one general question , > > How to write the safe query , which prevent the site from hijacker , > > Share your idea's pull the plug for the mains and save energy. there is no silver bullet. take a lecture in security and you will scream who much sim

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

2009-06-19 Thread Matt Neimeyer
>> SELECT zip FROM zipcodes WHERE >> degrees(acos(sin(radians(39.0788994))*sin(radians(latitude))+ >> cos(radians(39.0788994))*cos(radians(latitude))*cos(radians(-77.1227036-longitude*60*1.1515 >> < 5 > > Ouch.  You might want to calculate the rectange enclosing your target > distance, add an i

Re: BULK DATA HANDLING 0.5TB

2009-06-19 Thread walter harms
st...@edberg-online.com schrieb: > At 11:10 AM +0530 6/13/09, Krishna Chandra Prajapati wrote: >> Hi guys, >> >> I'm working in a telecom company. I have table called deliverylog in which >> 30 million records gets inserted per/day. The table has grown to 0.5TB I >> have to keep 60days record in

safe query prevent sites from hijacker

2009-06-19 Thread bharani kumar
Hi All , This is one general question , How to write the safe query , which prevent the site from hijacker , Share your idea's Thanks B.S.Bharanikumar

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

2009-06-19 Thread Dan Nelson
In the last episode (Jun 18), Matt Neimeyer said: > 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