RE: Slow query using string functions

2010-05-27 Thread Jerry Schwartz
.8796 / 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,

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

Re: Slow query using string functions

2010-05-27 Thread Baron Schwartz
Jerry, On Wed, May 26, 2010 at 5:13 PM, Jerry Schwartz 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 accessing many m

Re: Slow query using string functions

2010-05-27 Thread Joerg Bruehe
id = @PUBID AND prod.prod_discont = 0 > ORDER BY feed_new.new_title; > > [[...]] > > The query is doing a scan of the 9816 records that have pub_id = @PUBID, but > even so this seems like a long time. Are the built-in string functions really > that slow? The general rul

RE: Slow query using string functions

2010-05-26 Thread Gavin Towey
query 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). `fee

Slow query using string functions

2010-05-26 Thread Jerry Schwartz
possible_keys: pub_id,pub_id_2 key: pub_id key_len: 48 ref: const rows: 9816 Extra: Using where The query is doing a scan of the 9816 records that have pub_id = @PUBID, but even so this seems like a long time. Are the built-in string functions really

String functions FORMAT(X,D)

2006-05-23 Thread Jay
Hello MySQL Users Is there a way to change the separator in the following example, e.g. from "," to "'"? SELECT FORMAT(12332.123456, 4); -> '12,332.1235' is this the easiest way? SELECT REPLACE(FORMAT(12332.123456, 4), ",", "'"); -> '12'332.1235' or can this be set somewhere? Thank you! Jay

RE: String Functions

2003-12-04 Thread Victor Pendleton
-List (E-mail) Subject: RE: String Functions That I can do REPLACE(REPLACE(REPLACE(REPLACE(str,'(',''),')',''),'-',''),' ','') Looks kinda horrid to handle removing just four characters ( ) - and space And if any other

RE: String Functions

2003-12-04 Thread Luc Foisy
Victor Pendleton [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 11:15 AM To: Luc Foisy; MYSQL-List (E-mail) Subject: RE: String Functions Try the Replace function replace the `-` character with `` -Original Message- From: Luc Foisy [mailto:[EMAIL PROTECTED] Sent: Thursday, Dece

RE: String Functions

2003-12-04 Thread Victor Pendleton
Try the Replace function replace the `-` character with `` -Original Message- From: Luc Foisy [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 10:09 AM To: MYSQL-List (E-mail) Subject: String Functions Is there any function to strip non numeric characters from a string

String Functions

2003-12-04 Thread Luc Foisy
Is there any function to strip non numeric characters from a string? Such that FUNCTION('1-(519)-473-3853') would return '15194733853' -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: String functions for GROUP BY clause

2003-11-12 Thread Diana Soares
If you're using MySQL 4.1, you have the GROUP_CONCAT(expr) function. If not, then... i think someone has already done an UDF about this... Search the archives..or see this: http://www.cwts.nl/buter/misc/my-mysql.html -- Diana Soares On Wed, 2003-11-12 at 08:56, Ciprian Trofin wrote: > Is there

String functions for GROUP BY clause

2003-11-12 Thread Ciprian Trofin
Is there a way to use a string concatenating function in connection with a GROUP BY clause? I mean, for a one-to-many relation (like firm-stockholders relation), to "catch" a structure like: firm | stocholders f_1 | s_1; s_2; s_3 f_2 | s_4; s_5 f_3 | s_6 instead of firm |

Re: String functions for use in GROUP clause?

2003-10-10 Thread Egor Egorov
David Garamond <[EMAIL PROTECTED]> wrote: > We can use SUM(), AVG(), COUNT(), etc. in GROUP clause. These are all > numeric functions. Is it possible to use string functions as well? I > know MIN() & MAX() can be asciibetical for string fields, but wouldn't > t

String functions for use in GROUP clause?

2003-10-10 Thread David Garamond
We can use SUM(), AVG(), COUNT(), etc. in GROUP clause. These are all numeric functions. Is it possible to use string functions as well? I know MIN() & MAX() can be asciibetical for string fields, but wouldn't this be very handy/practical? SELECT division, G_CONCAT(", ",f

Re: Constants required in String functions

2003-06-03 Thread Egor Egorov
Hu Qinan <[EMAIL PROTECTED]> wrote: > > I am wondering whether constant arguments are required in string functions, e.g. > > Substring(str, pos, len). > > Given MyTable: >... >MyString TEXT,(muti-byte characte

Re: Constants required in String functions?

2003-06-03 Thread Becoming Digital
uspicion that's your problem. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Hu Qinan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, 03 June, 2003 03:05 Subject: Constants required in String functions? Dear all,

Constants required in String functions?

2003-06-03 Thread Hu Qinan
Dear all, I am wondering whether constant arguments are required in string functions, e.g. Substring(str, pos, len). Given MyTable: ... MyString TEXT,(muti-byte characters) MyPos UNSIGNED(10), MyLength UNSIGNED(10). While (1

Re: String Functions and Date Format Living Together in Harmony?

2002-09-20 Thread Paul DuBois
At 12:39 -0400 9/20/02, Stanley, Jason wrote: >hello all, > >i have the following selection in my query... >DATE_FORMAT(Images.TIMESTAMP, '%a %b %d at %l:%i %p') as TIME > >now, i want to apply LCASE or LOWER to it, but i'm a little unsure >how to handle the syntax with two sets of parentheses.

String Functions and Date Format Living Together in Harmony?

2002-09-20 Thread Stanley, Jason
hello all, i have the following selection in my query... DATE_FORMAT(Images.TIMESTAMP, '%a %b %d at %l:%i %p') as TIME now, i want to apply LCASE or LOWER to it, but i'm a little unsure how to handle the syntax with two sets of parentheses. any insight? tia, j --