Re: Query optimizer-miss with unqualified expressions, bug or feature?

2015-10-20 Thread Johan De Meersman
- Original Message - > From: "Shawn Green" > Subject: Re: Query optimizer-miss with unqualified expressions, bug or > feature? > > On a more serious note, indexes with limited cardinality are less useful > than those with excellent cardinality. Cardinali

Re: Query optimizer-miss with unqualified expressions, bug or feature?

2015-10-19 Thread Roy Lyseng
Hi Shawn, On 19.10.15 22.33, shawn l.green wrote: On 10/19/2015 3:48 PM, Roy Lyseng wrote: Hi Ben, On 19.10.15 16.07, Ben Clewett wrote: Hi Roy, Thanks for the clear explanation. I guess (hypothetically) the optimizer could see if it has a key, and then use two starts: one on 'a > 0' and

Re: Query optimizer-miss with unqualified expressions, bug or feature?

2015-10-19 Thread shawn l.green
On 10/19/2015 3:48 PM, Roy Lyseng wrote: Hi Ben, On 19.10.15 16.07, Ben Clewett wrote: Hi Roy, Thanks for the clear explanation. I guess (hypothetically) the optimizer could see if it has a key, and then use two starts: one on 'a > 0' and one on 'a < 0', taking a union of the result? Which

Re: Query optimizer-miss with unqualified expressions, bug or feature?

2015-10-19 Thread Roy Lyseng
Hi Ben, On 19.10.15 16.07, Ben Clewett wrote: Hi Roy, Thanks for the clear explanation. I guess (hypothetically) the optimizer could see if it has a key, and then use two starts: one on 'a > 0' and one on 'a < 0', taking a union of the result? Which might make a significant result to something

Re: Query optimizer-miss with unqualified expressions, bug or feature?

2015-10-19 Thread Ben Clewett
Hi Roy, Thanks for the clear explanation. I guess (hypothetically) the optimizer could see if it has a key, and then use two starts: one on 'a > 0' and one on 'a < 0', taking a union of the result? Which might make a significant result to something? Ben. On 2015-10-19 14:19, Roy Lyseng wr

Re: Query optimizer-miss with unqualified expressions, bug or feature?

2015-10-19 Thread Roy Lyseng
Hi Ben, On 19.10.15 15.10, Ben Clewett wrote: I have noticed that an unqualified boolean expression cannot be optimized by MySQL to use an index in 5.6.24. For example: CREATE TABLE t ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a BOOLEAN NOT NULL, KEY a (a) ) ENGINE=InnoDB; This wi

Query optimizer-miss with unqualified expressions, bug or feature?

2015-10-19 Thread Ben Clewett
I have noticed that an unqualified boolean expression cannot be optimized by MySQL to use an index in 5.6.24. For example: CREATE TABLE t ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a BOOLEAN NOT NULL, KEY a (a) ) ENGINE=InnoDB; This will hit key 'a': SELECT * FROM t WHERE a = TRUE;

Re: regular expressions matching only numeric characters in order

2008-12-01 Thread Paul Nowosielski
IL PROTECTED]> To: Paul Nowosielski <[EMAIL PROTECTED]>; mysql@lists.mysql.com Sent: Monday, December 1, 2008 6:42:19 PM Subject: RE: regular expressions matching only numeric characters in order Hi I am a bit of novice at Regexp, but I believe this will work for you (\d+\d+\d+).*(\d+\

regular expressions matching only numeric characters in order

2008-12-01 Thread Paul Nowosielski
Dear All, I'm trying to create a regular expression query to match phone numbers in a database field. My issue is this , the numbers have no set standard for input in the db. So the number in the db could be in multiple formats. EX: 333.333. (333)333- 333-333- 33 So I am wa

Re: use of wildcards or regular expressions in IFNULL, how to create a view that substitutes NULL by 0?

2008-09-06 Thread Brent Baisley
cceptable in my case. So is there a way to use wildcards/regular expressions in IFNULL? Is there another way to create a view that substitutes every NULL-value with 0? I'd appreciate any kind of help very much! Kind regards and greetings from Munich, Felix -- MySQL General Mailing List For

use of wildcards or regular expressions in IFNULL, how to create a view that substitutes NULL by 0?

2008-09-04 Thread drflxms
oblem, that it doesn't reflect new columns in the original table in the view, as there is no corresponding IFNULL-command in the view. This is not acceptable in my case. So is there a way to use wildcards/regular expressions in IFNULL? Is there another way to create a view that substitutes every

Regular Expressions in MySQL -- how to show addresses that have the same numbers?

2008-03-08 Thread Joshua Beall
ents of the address ("123" and "12345"), they would match. I am wondering, is there a way to search through a table like this (all fields are varchar): fname, lname, address, city, state, zip Using regular expressions, to show any records which match another record on lastn

Expressions, SQL Aggregate functions & SELECT Performance - index usage

2006-08-09 Thread Asif Lodhi
max key value to be inserted in the table instead of using the auto-increment (because it's rollback-unfriendly). However, I wonder if using such expressions (I not using any other functions except SQL Aggregate functions) in the select column-list would slow down the INSERTs and wha

Re: query w multiple tables and expressions

2004-07-15 Thread SGreen
t; For example: > Search for hotels where location is "Bern" and the hotel has sparetime > activity 2 and 5 AND services 5 and 3 and 7 > So only hotels which match all the expressions should appear as results. > > I've tried it with the following Query but this

AW: query w multiple tables and expressions

2004-07-15 Thread Salzgeber Olivier
Thank you very much. Works perfectly now. -Ursprüngliche Nachricht- Von: Harald Fuchs [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 15. Juli 2004 13:58 An: [EMAIL PROTECTED] Betreff: Re: query w multiple tables and expressions This gives all hotels having at least one of the required

Re: query w multiple tables and expressions

2004-07-15 Thread Harald Fuchs
tel has sparetime > activity 2 and 5 AND services 5 and 3 and 7 > So only hotels which match all the expressions should appear as results. > I've tried it with the following Query but this doesn't work as it should. > ***

query w multiple tables and expressions

2004-07-15 Thread Salzgeber Olivier
on is "Bern" and the hotel has sparetime activity 2 and 5 AND services 5 and 3 and 7 So only hotels which match all the expressions should appear as results. I've tried it with the following Query but this doesn't work as it should. *

Re: Expressions

2004-01-19 Thread Chris W
Ian O'Rourke wrote: Regarding the following query: SELECT ID,Author,DATE_FORMAT(EntryDate,'%d %m %y'),SectionID,Title,Summary,Content FROM articles ORDER BY EntryDate DESC LIMIT 10 I'm still new to Mysql so I'm not sure on this but I think the problem is with your ORDER BY field. Since you

Re: Expressions

2004-01-19 Thread Tobias Asplund
On Mon, 19 Jan 2004, Ian O'Rourke wrote: > Regarding the following query: > > SELECT ID,Author,DATE_FORMAT(EntryDate,'%d %m > %y'),SectionID,Title,Summary,Content FROM articles > ORDER BY EntryDate > DESC LIMIT 10 > > Okay, I've looked in the manually up and down, as I know how to do it in > Acce

Re: Expressions

2004-01-19 Thread Ian O'Rourke
rom: "sulewski" <[EMAIL PROTECTED]> > I think you can just put the alias after the field like so, > > select id,author,date_format(entrydate,'%d %m %y') ArticleDate, > SectionId,Title,Summary... > You were correct - the version using AS does not work (I'd tried that before mailing). -- MySQL

Re: Expressions

2004-01-19 Thread sulewski
I think you can just put the alias after the field like so, select id,author,date_format(entrydate,'%d %m %y') ArticleDate, SectionId,Title,Summary... On Monday, January 19, 2004, at 02:16 PM, Ian O'Rourke wrote: Regarding the following query: SELECT ID,Author,DATE_FORMAT(EntryDate,'%d %m %y'

Re: Expressions

2004-01-19 Thread Martin Gainty
you were so close http://www.mysql.com/doc/en/SELECT.html SELECT COLUMNNAME AS WHATEVER FROM TABLENAME; Marty Gainty - Original Message - From: "Ian O'Rourke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 19, 2004 2:16 PM Subject: Ex

Expressions

2004-01-19 Thread Ian O'Rourke
Regarding the following query: SELECT ID,Author,DATE_FORMAT(EntryDate,'%d %m %y'),SectionID,Title,Summary,Content FROM articles ORDER BY EntryDate DESC LIMIT 10 Okay, I've looked in the manually up and down, as I know how to do it in Access, but I can't find it. I want to set an expression so I

Re: Expressions in the select query are case insensitive

2003-11-28 Thread Mikael Fridh
Sorry about the double posts... But I forgot something... On Friday 28 November 2003 14.51, Lemasson Sylvain wrote: > Can something be done so that mysql be case sensitive ? If you only need case-sentivitity on selects read this: http://www.mysql.com/doc/en/Case_Sensitivity_Operators.html " The B

Re: Expressions in the select query are case insensitive

2003-11-28 Thread Mikael Fridh
On Friday 28 November 2003 14.51, Lemasson Sylvain wrote: > Hello, Hi > The first think is that I cannot add a primary constraint on test because > Mysql do not make the difference between 'bla' and 'BLA'. It is case > insensitive. I have the same problem when I do: select * from test where > valu

Expressions in the select query are case insensitive

2003-11-28 Thread Lemasson Sylvain
Hello, I have a simple table test like create table test (value varchar(10)); in witch I have insert two lines: insert into test values('bla'); insert into test values('BLA'); The first think is that I cannot add a primary constraint on test because M

RE: SQL and evaluating expressions

2003-10-10 Thread Stephen Rich
audience would be the same plus I saw some other posts regarding how to construct tables and queries. > Can SQL statements evaluate expressions? I want to store thousands of > equations, and return a subset when I plug in a value. > > For instance, if I stored the following two equations:

SQL and evaluating expressions

2003-10-10 Thread Stephen Rich
Can SQL statements evaluate expressions? I want to store thousands of equations, and return a subset when I plug in a value. For instance, if I stored the following two equations: x = y + 5; x = 100 / y; I might want to query for all records whose x is less than 10 when y is equal to 3. I&#

Regular Expressions with SQL

2003-02-26 Thread Free Grafton
Hello, I¹m trying to filter a column of phone numbers that contains spaces, parenthesis, dashes, and possibly letters using sql with the following query. Am I going down the right path with the following sql statement or should I be doing something totally different? I¹m trying to say use the cont

Re: Regular Expressions

2003-02-10 Thread Nasser Ossareh
; > It is the same as using the LIKE operator wit more > complex patterns > > Dobromir Velev > [EMAIL PROTECTED] > http://www.websitepulse.com > > > > > - Original Message - > From: "Darren Young" <[EMAIL PROTECTED]> > To: <[E

Re: Regular Expressions

2003-02-08 Thread Dobromir Velev
PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 00:02 Subject: Regular Expressions > I've looked through the mysql manual for information on regualar > expressions, and all that it seems to have are references such as: > > SELECT "fo\nfo" RE

Re: Regular Expressions

2003-02-07 Thread Keith C. Ivey
On 5 Feb 2003, at 16:02, Darren Young wrote: > I've looked through the mysql manual for information on regualar > expressions, and all that it seems to have are references such as: > > SELECT "fo\nfo" REGEXP "^fo$"; > > How can the REGEXP be app

Regular Expressions

2003-02-06 Thread Darren Young
I've looked through the mysql manual for information on regualar expressions, and all that it seems to have are references such as: SELECT "fo\nfo" REGEXP "^fo$"; How can the REGEXP be applied to a 'SELECT field FROM table' kind of statement?

QUESTION: Precompiled regular expressions?

2003-02-02 Thread john
Hi, I am a web developer and I wrote a script that cycles through a bunch of regular expressions stored in a database. Is there or will there be a way to precompile and store precompiled regular expressions in mysql? I would then need to run them against a string/(var)char field

extracting submatches from regular expressions

2002-11-21 Thread Murad Nayal
Hello all, Is there a mysql function that extracts sub matches from regular expressions. for example in perl when you match a string to a regular expression like /\s+(\S+)\s+(\S+)/ the submatches (strings matching the part of the expression between parenthesis) are available in variables $1, $2

Re: REGULAR EXPRESSIONS

2002-03-04 Thread Jeremy Zawodny
On Mon, Mar 04, 2002 at 12:25:44PM +0100, Angela Harneit wrote: > I've a question concerning negations of regular expressions - e.g. I > want the sentence "this is nice" to match, while the sentence "this > is not nice" should not match. I only found possibil

REGULAR EXPRESSIONS

2002-03-04 Thread Egor Egorov
Angela, Monday, March 04, 2002, 1:25:44 PM, you wrote: AH> I've a question concerning negations of regular expressions - e.g. I AH> want the sentence "this is nice" to match, while the sentence "this is AH> not nice" should not match. AH> I only found pos

REGULAR EXPRESSIONS

2002-03-04 Thread Angela Harneit
I've a question concerning negations of regular expressions - e.g. I want the sentence "this is nice" to match, while the sentence "this is not nice" should not match. I only found possibilities for the negation of single characters on the MySQL-site, but what about

Re: Update table using regular expressions MySQL

2001-07-03 Thread Hannes Niedner
nt to update 160 records in a table. The field contains a variable >> value and a constant prefex like >> >> 'constant: unique value for this record' >> >> Is there such an UPDATE statement that would update this field into >> >> 'unique value

Update table using regular expressions MySQL

2001-07-03 Thread Hannes Niedner
rwise is using Perls regular expressions like (this is rather pseudocode just to make the point) $foo = 'constant: unique value for this record'; $foo =~ s/constant:(.+)//sg; $bar = $1; #(and hopefully $1 would hold 'unique value for this record') UPDATE my_table SET field = $

Re: PATCH2: REGEXP in select only works with short expressions onAlpha

2001-04-12 Thread Stephen Beynon
Thanks for the patch and the rapid response :) My application has been running with this patch for 15 hours now - and has done over 2 million regexp matches without problems :) Stephen On Wed, 11 Apr 2001, Michael Widenius wrote: > > > "Stephen" == Stephen Beynon <[EMAIL PROTECTED]> writ

PATCH2: REGEXP in select only works with short expressions on Alpha

2001-04-11 Thread Michael Widenius
> "Stephen" == Stephen Beynon <[EMAIL PROTECTED]> writes: Stephen> On Tue, 10 Apr 2001, Michael Widenius wrote: Stephen> Thankyou for the patch - it certainly improves the situation (and fixes Stephen> the test case I gave) but I seem to have found another problem with regexp Stephen> :(

Re: PATCH: REGEXP in select only works with short expressions onAlpha

2001-04-10 Thread Stephen Beynon
on: > >> > When transfering a database application to use an Alpha Linux server > >> > rather than intel Linux previously working regular expressions fail to work. > >> > It appears to be due to a length limit. This effects both binary downloads > >> &g

PATCH: REXEXP in select only works with short expressions on Alpha

2001-04-10 Thread Michael Widenius
y 2.95.2 if you think that would Stephen> be usefull) >> [EMAIL PROTECTED] writes: >> > >Description: >> >When transfering a database application to use an Alpha Linux server >> > rather than intel Linux previously working regular expressions fail

Re: REXEXP in select only works with short expressions on Alpha

2001-04-09 Thread Stephen Beynon
> [EMAIL PROTECTED] writes: > > >Description: > >When transfering a database application to use an Alpha Linux server > > rather than intel Linux previously working regular expressions fail to work. > > It a

Re: REXEXP in select only works with short expressions on Alpha

2001-04-09 Thread Sinisa Milivojevic
[EMAIL PROTECTED] writes: > >Description: > When transfering a database application to use an Alpha Linux server > rather than intel Linux previously working regular expressions fail to work. > It appears to be due to a length limit. This effects both binary downloa

RE: REXEXP in select only works with short expressions on Alpha

2001-04-08 Thread Quentin Bennett
Hi, Just a guess, but I expect that the first response will be to use gcc 2.95.2 or later Quentin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, 9 April 2001 1:30 p.m. To: [EMAIL PROTECTED] Subject: REXEXP in select only works with short expressions

REXEXP in select only works with short expressions on Alpha

2001-04-08 Thread stephen
>Description: When transfering a database application to use an Alpha Linux server rather than intel Linux previously working regular expressions fail to work. It appears to be due to a length limit. This effects both binary downloads and home compiled distributions. >How-To-