maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #01451
Re: help - i'm not finding one sql function
-
To:
Mailing-List mariadb <"maria-discuss"@lists.launchpad.net>
-
From:
Reindl Harald <h.reindl@xxxxxxxxxxxxx>
-
Date:
Wed, 19 Mar 2014 16:33:13 +0100
-
In-reply-to:
<CAFa9YRA=6NpVpcTYcT5PhPN2K=gbtZUeGdrepvKwBe2k=1ocrA@mail.gmail.com>
-
Openpgp:
id=7F780279; url=http://arrakis.thelounge.net/gpg/h.reindl_thelounge.net.pub.txt
-
Organization:
the lounge interactive design
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
i feel like to comment mailing-list basics
* DON'T top-post, you are destryoing threads
* DON'T convert plaintext posts to HTML
* DON'T reply-all, the reply button results in a off-list answer
Am 19.03.2014 16:25, schrieb Peter Laursen:
> I feel like to comment here on "because it can't use indexes for such things".
> This is not a serious reply IMO. It is just another way or saying "Please shut up!"
it is serious and don't insinuate words one have not said
there is a) no such function and b) no benefit of it
> How many existing string functions (http://dev.mysql.com/doc/refman/5.6/en/string-functions.html) use an index?
> Does "select concat('a','b');" do for instance?
that does not read and seek anything in a column
frankly "select concat('a','b');" is the same as "ab"
> I cannot think of any. And why do we have 'stored programs' if a
> database server should only do things that uses indexes? Does a
> WHILE-loop inside a stroed program use an index?
surely can someone discuss what should be donme
> Unlike most other RDBMS, MySQL has a tradition to do things in the application thet other RDBMS would do in the
> database. But that traditions is/was because of lack of functionality in the server before 5.0 (what is still the
> case in some respects. Try compare a MySQL TRIGGER with an Oracle or SQL Server same, for instance).
>
> That said: this functionality can be implemented in a stored function using existing string functions (or in the
> application, as sugggested) quite easily
maybe
> It is not possible (or desirable) to add build-in functions for everything
which was my point
> And I have no clue is such string function exists in other RDBMS.
unlikely
> On Wed, Mar 19, 2014 at 4:03 PM, Reindl Harald <h.reindl@xxxxxxxxxxxxx <mailto:h.reindl@xxxxxxxxxxxxx>> wrote:
>
> Am 19.03.2014 15:51, schrieb Roberto Spadim:
> > hi guys, i'm not finding a function to return how many character i have, for example:
> >
> > "banana"
> >
> > i want a function that return 2 "n" characters, example:
> > substr_count("banana","n") => 2
> >
> > sorry it a begginners question, but i didn't found it in mysql/mariadb manual
>
> that is not the job of the database server because it
> can't use indexes for such things - just iterate
> the result and do it in the application
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References