[firebird-support] Re: Parameterised like query won't use index in the plan

2012-10-30 Thread roydamman
Don't use LIKE for an equivalence query. The purpose of LIKE is to pass a string with wildcard characters (_ or % in SQL). Your literal query self-converts to an equivalence query, viz., select * from mytable where myfield = 'test' or to a STARTING WITH query select * from mytable

Re: [firebird-support] Re: Parameterised like query won't use index in the plan

2012-10-30 Thread Kjell Rilbe
Den 2012-10-30 08:45 skrev roydamman såhär: Hello Helen, you are right, not to use LIKE for a normal search. But LIKE was used to give the users of my programs, the most flexibel search options. It seems not a good practice. You could analyze the search string entered by the user, and if

RE: [firebird-support] Re: Parameterised like query won't use index in the plan

2012-10-30 Thread Maya Opperman
Now, I wonder if something similar could actually be done internally by Firebird for the general like case? That gets my vote!

Re: {Disarmed} [firebird-support] Re: UNION prevents all records from being pulled to the results

2012-10-30 Thread SoftTech
Thanks Alexandre, Aage, and Ann. I've been working in Interbase and Firebird since 1996 and never had run across this before because my row were always distinct. I knew it was something I was doing wrong. Thanks again to all who replied, Mike - Original Message - From: Aage

Re: [firebird-support] Stored Proc vs View, which one has better performance?

2012-10-30 Thread Ann Harrison
On Tue, Oct 30, 2012 at 12:19 AM, trskopo trsk...@yahoo.com wrote: I want to select from that table, all records that has sum(qty) 0 group by id_cst and id_gd. I have 2 options to do that : 1) create a view with a ddl like this : create view tmp (id_cst, id_gd, qty) as

RE: [firebird-support] Re: Parameterised like query won't use index in the plan

2012-10-30 Thread bogdan
I second that Regards Bogdan From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Ann Harrison Sent: Tuesday, October 30, 2012 3:36 PM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] Re: Parameterised like query won't use index in

Re: [firebird-support] Raising the scale of a NUMERIC field

2012-10-30 Thread W O
A very interesting post, I had learned something new. Greetings. Walter. On Mon, Oct 29, 2012 at 2:48 PM, Mark Rotteveel m...@lawinegevaar.nlwrote: ** On 29-10-2012 17:48, Carlos H. Cantu wrote: MR No, a direct system table update like that would rescale all your existing MR

[firebird-support] About the current transaction

2012-10-30 Thread W O
Hello everybody Is it possible to have a SELECT which says me if the current transaction ... - Is READ COMMITED or SNAPSHOT - Is READ ONLY or READ WRITE - Is WAIT or NO WAIT ? Thanks in advance. Walter. [Non-text portions of this message have been removed]

[firebird-support] Re: Stored Proc vs View, which one has better performance?

2012-10-30 Thread trskopo
Ah, that's right, using having clause is much more simple, thanks a lot for that tip. Sugi Have you considered just select id_cst,id_gd,sum(qty) qtySum from Tbl1 group by id_cst,id_gd having qtySum 0 There's a slight benefit to the view or stored