473,700 Members | 2,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page Processing Efficiency

If I had a page that was being generated using coldfusion from queries
to an oracle table would it be better response time:
A) pulling the all the data using 1 query and iterating over the same
result table multiple time producing desired arrays, or
B) pulling specific data using specific queries with less production of
arrays and proccessing after te data was returned?

In the example I had 2 date fields called start and comp in a table with
other like data and wanted to know what the min value was from both
fields.

So I have to "select * from the table where mynum='131'" and then
process the result set

or

"select * from the table where mynum='131'" as well as 2 more queries:

"SELECT min(min_start) as min_start
FROM
(
SELECT min(BASE_START) as min_start
FROM TASK
WHERE my_NUM = '131'
UNION
SELECT min(ACT_START) as min_start
FROM TASK
WHERE my_NUM = '131'
)"

and

" SELECT max(max_comp) as max_comp
FROM
(
SELECT max(BASE_COMP) as max_comp
FROM TASK
WHERE my_NUM = '131'
UNION
SELECT max(ACT_COMP) as max_comp
FROM TASK
WHERE my_NUM = '131'
)
"

Jul 19 '05 #1
5 2947
use bind variables. Lot of cold fusion folks don't and it hurts their
scalability. Cold Fusion does support it.
Jim
"Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
news:3F******** *******@ram.lmt as.lmco.com...
If I had a page that was being generated using coldfusion from queries
to an oracle table would it be better response time:
A) pulling the all the data using 1 query and iterating over the same
result table multiple time producing desired arrays, or
B) pulling specific data using specific queries with less production of
arrays and proccessing after te data was returned?

In the example I had 2 date fields called start and comp in a table with
other like data and wanted to know what the min value was from both
fields.

So I have to "select * from the table where mynum='131'" and then
process the result set

or

"select * from the table where mynum='131'" as well as 2 more queries:

"SELECT min(min_start) as min_start
FROM
(
SELECT min(BASE_START) as min_start
FROM TASK
WHERE my_NUM = '131'
UNION
SELECT min(ACT_START) as min_start
FROM TASK
WHERE my_NUM = '131'
)"

and

" SELECT max(max_comp) as max_comp
FROM
(
SELECT max(BASE_COMP) as max_comp
FROM TASK
WHERE my_NUM = '131'
UNION
SELECT max(ACT_COMP) as max_comp
FROM TASK
WHERE my_NUM = '131'
)
"

Jul 19 '05 #2
Jim,

Can you elaborate with a simple example?

Mike

Jim Kennedy wrote:
use bind variables. Lot of cold fusion folks don't and it hurts their
scalability. Cold Fusion does support it.
Jim
"Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
news:3F******** *******@ram.lmt as.lmco.com...
If I had a page that was being generated using coldfusion from queries
to an oracle table would it be better response time:
A) pulling the all the data using 1 query and iterating over the same
result table multiple time producing desired arrays, or
B) pulling specific data using specific queries with less production of
arrays and proccessing after te data was returned?

In the example I had 2 date fields called start and comp in a table with
other like data and wanted to know what the min value was from both
fields.

So I have to "select * from the table where mynum='131'" and then
process the result set

or

"select * from the table where mynum='131'" as well as 2 more queries:

"SELECT min(min_start) as min_start
FROM
(
SELECT min(BASE_START) as min_start
FROM TASK
WHERE my_NUM = '131'
UNION
SELECT min(ACT_START) as min_start
FROM TASK
WHERE my_NUM = '131'
)"

and

" SELECT max(max_comp) as max_comp
FROM
(
SELECT max(BASE_COMP) as max_comp
FROM TASK
WHERE my_NUM = '131'
UNION
SELECT max(ACT_COMP) as max_comp
FROM TASK
WHERE my_NUM = '131'
)
"


Jul 19 '05 #3
It should be on the documentation. I don't have cold fusion docs. We are
talking about parameterized queries.
Jim
"Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
news:3F******** *******@ram.lmt as.lmco.com...
Jim,

Can you elaborate with a simple example?

Mike

Jim Kennedy wrote:
use bind variables. Lot of cold fusion folks don't and it hurts their
scalability. Cold Fusion does support it.
Jim
"Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
news:3F******** *******@ram.lmt as.lmco.com...
If I had a page that was being generated using coldfusion from queries
to an oracle table would it be better response time:
A) pulling the all the data using 1 query and iterating over the same
result table multiple time producing desired arrays, or
B) pulling specific data using specific queries with less production of arrays and proccessing after te data was returned?

In the example I had 2 date fields called start and comp in a table with other like data and wanted to know what the min value was from both
fields.

So I have to "select * from the table where mynum='131'" and then
process the result set

or

"select * from the table where mynum='131'" as well as 2 more queries:

"SELECT min(min_start) as min_start
FROM
(
SELECT min(BASE_START) as min_start
FROM TASK
WHERE my_NUM = '131'
UNION
SELECT min(ACT_START) as min_start
FROM TASK
WHERE my_NUM = '131'
)"

and

" SELECT max(max_comp) as max_comp
FROM
(
SELECT max(BASE_COMP) as max_comp
FROM TASK
WHERE my_NUM = '131'
UNION
SELECT max(ACT_COMP) as max_comp
FROM TASK
WHERE my_NUM = '131'
)
"

Jul 19 '05 #4
So after returning say 150 rows of data from a single query I can further query
the results of the returned rows?

Mike

Jim Kennedy wrote:
It should be on the documentation. I don't have cold fusion docs. We are
talking about parameterized queries.
Jim
"Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
news:3F******** *******@ram.lmt as.lmco.com...
Jim,

Can you elaborate with a simple example?

Mike

Jim Kennedy wrote:
use bind variables. Lot of cold fusion folks don't and it hurts their
scalability. Cold Fusion does support it.
Jim
"Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
news:3F******** *******@ram.lmt as.lmco.com...
> If I had a page that was being generated using coldfusion from queries
> to an oracle table would it be better response time:
> A) pulling the all the data using 1 query and iterating over the same
> result table multiple time producing desired arrays, or
> B) pulling specific data using specific queries with less production of > arrays and proccessing after te data was returned?
>
> In the example I had 2 date fields called start and comp in a table with > other like data and wanted to know what the min value was from both
> fields.
>
> So I have to "select * from the table where mynum='131'" and then
> process the result set
>
> or
>
> "select * from the table where mynum='131'" as well as 2 more queries:
>
> "SELECT min(min_start) as min_start
> FROM
> (
> SELECT min(BASE_START) as min_start
> FROM TASK
> WHERE my_NUM = '131'
> UNION
> SELECT min(ACT_START) as min_start
> FROM TASK
> WHERE my_NUM = '131'
> )"
>
> and
>
> " SELECT max(max_comp) as max_comp
> FROM
> (
> SELECT max(BASE_COMP) as max_comp
> FROM TASK
> WHERE my_NUM = '131'
> UNION
> SELECT max(ACT_COMP) as max_comp
> FROM TASK
> WHERE my_NUM = '131'
> )
> "
>


Jul 19 '05 #5
Look up parameterized queries or host variables in your documentation. You
aren't using them and you should if you want to scale well. A query with
bind variables will avoid the reparsing that dynamic sql has and hence you
will get better performance and scalability. (less latching, less CPU
usage).
eg select col1, col2, col3 from mytable where col1=?
Jim
"Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
news:3F******** ******@ram.lmta s.lmco.com...
So after returning say 150 rows of data from a single query I can further query the results of the returned rows?

Mike

Jim Kennedy wrote:
It should be on the documentation. I don't have cold fusion docs. We are talking about parameterized queries.
Jim
"Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
news:3F******** *******@ram.lmt as.lmco.com...
Jim,

Can you elaborate with a simple example?

Mike

Jim Kennedy wrote:

> use bind variables. Lot of cold fusion folks don't and it hurts their > scalability. Cold Fusion does support it.
> Jim
> "Michael Hill" <hi****@ram.lmt as.lmco.com> wrote in message
> news:3F******** *******@ram.lmt as.lmco.com...
> > If I had a page that was being generated using coldfusion from queries > > to an oracle table would it be better response time:
> > A) pulling the all the data using 1 query and iterating over the same > > result table multiple time producing desired arrays, or
> > B) pulling specific data using specific queries with less production
of
> > arrays and proccessing after te data was returned?
> >
> > In the example I had 2 date fields called start and comp in a
table with
> > other like data and wanted to know what the min value was from

both > > fields.
> >
> > So I have to "select * from the table where mynum='131'" and then
> > process the result set
> >
> > or
> >
> > "select * from the table where mynum='131'" as well as 2 more queries: > >
> > "SELECT min(min_start) as min_start
> > FROM
> > (
> > SELECT min(BASE_START) as min_start
> > FROM TASK
> > WHERE my_NUM = '131'
> > UNION
> > SELECT min(ACT_START) as min_start
> > FROM TASK
> > WHERE my_NUM = '131'
> > )"
> >
> > and
> >
> > " SELECT max(max_comp) as max_comp
> > FROM
> > (
> > SELECT max(BASE_COMP) as max_comp
> > FROM TASK
> > WHERE my_NUM = '131'
> > UNION
> > SELECT max(ACT_COMP) as max_comp
> > FROM TASK
> > WHERE my_NUM = '131'
> > )
> > "
> >

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2554
by: Eric Linders | last post by:
Hello, I have a Web form that is filled out on my company's web site. When the submit button is pressed, the form data is posted to a PHP page that (in the background) inserts their information into a database, sends them a confirmation e-mail, etc. Once the form processing is done, the user is redirected to a Thank You Page. The thank you page has the following code in it:
6
1519
by: bissatch | last post by:
Hi, I have been tryin to run free dhtml code from a web page. The web page is: http://dynamicdrive.com/dynamicindex14/pixelate.htm When I load the page above it opens as normal and the slide show automatically runs but when I open my own page that I have saved on my desktop, created from code from the above url, SP2 bar kicks in at the
7
3127
by: A Causal | last post by:
I'm an experienced C programmer, but I have never worked with any sort of internet programming. I would like to write a program to search for certain character strings in a currently displayed web page, and then get the string that immediatly follows the one that I searched for. It seems like an easy thing to do, after all the stuff that I want is staring me right in the face, but I have no idea where that stuff is stored or how to access...
9
4057
by: Arnold | last post by:
I need to read a binary file and store it into a buffer in memory (system has large amount of RAM, 2GB+) then pass it to a function. The function accepts input as 32 bit unsigned longs (DWORD). I can pass a max of 512 words to it at a time. So I would pass them in chunks of 512 words until the whole file has been processed. I haven't worked with binary files before so I'm confused with how to store the binary file into memory. What sort of...
4
3559
by: Vinay Agarwal | last post by:
Hello, I would like to maximize efficiency of string processing in my C# application that works with Skype API. Actually, these "strings" are made of "chars" that are all 8-bit values except 0 (1-255). 1. Is there a way to make C# use 8-bit char so that the memory usage is reduced? 2. Should StringBuilder be used in place of string while they are being
4
2066
by: Jeremy Holt | last post by:
Hi, In a windows.forms application I would BeginInvoke a delegate on the UI thread to collect data from a database. When the call returns to the AsyncCallback, if the Control.InvokeRequired = True, I would then have the Control.BeginInvoke(New AsyncCallback(AddressOf GetDataCallback), New Object() {ar}). How would one achieve the same thing on an asp.net page (without using a webseervice)? In the code below, because the...
4
3606
by: Alexis Gallagher | last post by:
(I tried to post this yesterday but I think my ISP ate it. Apologies if this is a double-post.) Is it possible to do very fast string processing in python? My bioinformatics application needs to scan very large ASCII files (80GB+), compare adjacent lines, and conditionally do some further processing. I believe the disk i/o is the main bottleneck so for now that's what I'm optimizing. What I have now is roughly as follows (on python...
3
2007
by: thomas.porschberg | last post by:
Hi, I want to read records from a database and export it in an arbitrary format. My idea was to feed a class with a String array fetched from the database and let this class fire SAX events as processor input. The basic class hierarchy is:
5
192
by: Michael Hill | last post by:
If I had a page that was being generated using coldfusion from queries to an oracle table would it be better response time: A) pulling the all the data using 1 query and iterating over the same result table multiple time producing desired arrays, or B) pulling specific data using specific queries with less production of arrays and proccessing after te data was returned? In the example I had 2 date fields called start and comp in a table...
0
8638
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9058
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8952
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8909
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7791
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6555
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4649
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3081
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2371
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.