473,785 Members | 2,235 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 2953
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
2557
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
1523
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
3131
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
4066
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
3561
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
2072
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
3620
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
2010
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
9484
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
10350
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
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
10097
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
9957
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
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
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
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.