Re: ODBC connector and MySQL Enterprise Edition

2014-02-17 Thread shawn l.green
Hello Femitha, On 2/17/2014 12:16 AM, Femitha Majeed wrote: Hi, Please help me by answering this question. Currently we've a database link between Oracle database and MySQL database using mysql-connector-odbc-5.1.8, will this connector work if I change my MySQL to enterprise edition ? Thank

Re: Narrowing a SELECT statement by multiple hits

2014-02-17 Thread Jennifer
On Feb 12, 2014, at 6:30 PM, Larry Martell wrote: Try adding a having clause, e.g.: SELECT `ip`,`page`,`url`,`time_stamp` FROM `ip_addresses` WHERE (`time_stamp` BETWEEN date_add( CURDATE(), INTERVAL -1 DAY ) AND CURDATE() - INTERVAL 1 SECOND) AND TRIM(`referrer`) LIKE '' HAVING

Re: Narrowing a SELECT statement by multiple hits

2014-02-17 Thread Roy Lyseng
Hi Jennifer, please try filtering with a subquery that locates ip addresses with more than 1 attempt: SELECT ip, page, url, time_stamp FROM ip_adresses WHERE existing where clause AND ip IN (SELECT ip FROM ip_addresses WHERE existing where clause

Re: Narrowing a SELECT statement by multiple hits

2014-02-17 Thread Jennifer
On Feb 17, 2014, at 10:17 AM, Roy Lyseng wrote: please try filtering with a subquery that locates ip addresses with more than 1 attempt: Hi Roy, That did it! Thank you so much!!! Now I just need to study that IN clause to see what's going on there. If this is too slow, you may

Re: Narrowing a SELECT statement by multiple hits

2014-02-17 Thread Roy Lyseng
Hi Jennifer, great that it worked. Try replacing the line `ip` IN (temp_ip) with `ip` IN (SELECT ip FROM temp_ip) Each subquery needs to be a complete SELECT query. Thanks, Roy On 17.02.14 21:11, Jennifer wrote: On Feb 17, 2014, at 10:17 AM, Roy Lyseng wrote: please try filtering

Re: Narrowing a SELECT statement by multiple hits

2014-02-17 Thread shawn l.green
Hi Jennifer, On 2/17/2014 3:11 PM, Jennifer wrote: CREATE TEMPORARY TABLE temp_ip AS (SELECT `ip` FROM `ip_addresses` WHERE (`time_stamp` BETWEEN date_add( CURDATE(), INTERVAL -1 DAY ) AND CURDATE() - INTERVAL 1 SECOND) AND TRIM(`referrer`) LIKE '' GROUP BY `ip` HAVING

Re: Narrowing a SELECT statement by multiple hits

2014-02-17 Thread Jennifer
On Feb 17, 2014, at 12:36 PM, Roy Lyseng wrote: Try... `ip` IN (SELECT ip FROM temp_ip) Wow! Only 1 second to return the results now!! That's 15x faster!!! Each subquery needs to be a complete SELECT query. That's good to know. I figured that since temp_ip referenced a