will be
faster such as use of memory etc. It is not all about how fast you get
results back.
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: 21 January 2005 00:13
To: CF-Talk
Subject: RE: Stored Proc Question
I thought that even with simple queries that Stored Procs where
Good point. But you can't use query caching without placing in application
or session scope and still use cfqueryparam
-Original Message-
From: Robertson-Ravo, Neil (RX)
In some cases yes but in reality if you are using query caching with cfquery
it can be just as fast. For simple
Caching with CFQUERY? To be honest I rarely use CFQUERY now apart from QoQ
so I am a tad rusty on its ins and outs ;-)
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: 21 January 2005 13:51
To: CF-Talk
Subject: RE: Stored Proc Question
Good point. But you
Andy Ousterhout wrote:
I thought that even with simple queries that Stored Procs where much faster?
That is not my experience. YMMV
Jochem
~|
Logware: a new and convenient web-based time tracking application. Start
tracking
Has anyone tested simple cached queries with CFQUERY against the
performance of sp_executesql and SQL statement strings? Functionally
it's exactly the same as cfquery in that variables are replaced with
values... however, the DB does the work and the CF server simply
issues directives and receives
Andy Ousterhout wrote:
Lets say that I need to look up an invoice by 2 different mechanisms:
Internal reference/Key
2 strings
Will the execution plan for a stored proc for the Key be different enough from
one for the strings to justify creating 2 stored procs? Right now I've got a
Here is the proc that I am using. You suggest either 2 separate queries or
2 procs?
create proc spreadInvoice
@InvoiceNumber int, /*Provide either Invoice Number or both
*/
@PeachTreeInvoice char(21), /* Peachtree Invoice Number and */
@PeachtreeKey
Andy Ousterhout wrote:
Here is the proc that I am using. You suggest either 2 separate queries or
2 procs?
WHERE ((@InvoiceNumber IS NOT NULL) AND (tabInvoices.InvoiceNumber
[EMAIL PROTECTED]))
OR ((@PeachtreeKEY IS NOT NULL) AND (@PeachtreeInvoice IS
NOT NULL)
I thought that even with simple queries that Stored Procs where much faster?
I tried this on a couple of other SELECTS and got noticable improvement. By
the way, I always use CFQUERRPARAM.
Andy
-Original Message-
From: Jochem van Dieten
Andy Ousterhout wrote:
Here is the proc that I
You need to write a cursor, it sounds like. Take a look in the books online
to get a sense of how it works.
M
-Original Message-
From: Eric Creese [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 10:29 AM
To: CF-Talk
Subject: Stored Proc Question Help Please
This is a very
The syntax I have attached actually uses two temp tables and then unions
them at the end, but does use a cursor to loop with. Keep in mind this is
SQL 6.5, and some of the functionality might be depricated or changed:
create table #temp_origin_records (
summary_id int,
Although a trigger would be better. Much more efficient in this case.
WG
-Original Message-
From: Haggerty, Mike [mailto:[EMAIL PROTECTED]
Sent: 05 June 2003 15:48
To: CF-Talk
Subject: RE: Stored Proc Question Help Please
You need to write a cursor, it sounds like. Take a look
What's the relationship between the two tables?
Ade
-Original Message-
From: Eric Creese [mailto:[EMAIL PROTECTED]
Sent: 05 June 2003 15:29
To: CF-Talk
Subject: Stored Proc Question Help Please
This is a very simple question.
I need to do this in SQL Server from a job not a CF page.
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
create PROCEDURE dbo.sp_getId
AS
BEGIN
declare @intError int
if object_id('tempdb..#myTempTable') is not null drop #myTemptable
/* Create Table */
Thanks I will see what I can do with this. I appreciate you time and your help.
-Original Message-
From: John Stanley [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 9:53 AM
To: CF-Talk
Subject: RE: Stored Proc Question Help Please
The syntax I have attached actually uses two
Eric Creese wrote:
This is a very simple question.
I need to do this in SQL Server from a job not a CF page.
I have a table where I store customer IDs. I want to pull the individual IDs and
loop each ID out of the table and run it against another query and write that output
of the
I guess I could try this
-Original Message-
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 10:07 AM
To: CF-Talk
Subject: Re: Stored Proc Question Help Please
Eric Creese wrote:
This is a very simple question.
I need to do this in SQL Server from
Thanks for everyones input!
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ:
Hello, i'm running a stored proc that contains two queries.
if the first query runs and does not return records, i need
to run the second query. Can anyone tell me the equivilent
of recordCount in Transact-SQL? Thanks.
You should be able to use @@ROWCOUNT for this.
Dave Watts, CTO, Fig
If your running a SELECT statement you can include COUNT(*) as an extra
column. If you are running another SQL statement which does not return a
recordset (INSERT, DELETE, UPDATE) you can check the @@ROWCOUNT something
like:
IF @@ROWCOUNT = 0
YOUR SECOND QUERY
Cheers,
Bill
In a
First Query here
IF @@rowcount = 0
BEGIN
-- Second query here
END
--
Andrew Ewings
Project Manager
Thoughtbubble Ltd
http://www.thoughtbubble.net
--
if you need to refer to the rowcount in more than
one place.
My $.25 worth...
Shawn Grover
-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 13, 2001 10:56 AM
To: CF-Talk
Subject: RE: Stored Proc Question
First Query here
IF @@rowcount = 0
BEGIN
22 matches
Mail list logo