Excessive looping or not!!

Hi, would be v grateful if anybody could help me with the
following.
I have a website that has about 500 hotels on it, each with
its own profile page. I record every time a user clicks on profile
page'
I insert date, and recordid into sql database and generate a
report that shows the 500 hotels, along with the relevant number oh
hits on their profile pages. The page takes upto 500 seconds to
make.Admittedly there are over a milllion rows in the table, but it
still seems a lot of time, and I was thinking there may be some
more efficeint way of organising the sql to speed it up
At present the sql goes like the following
i.e
<cfloop query "allhotels">
<cfquery name="hotelstats" datasource = "xxx">
Select id, Count(id) as idtotal from hotelstats where id =
#allhotels.id#
</cfquery>
<cfoutput>
#allhotels.hotelname# # idtotal#
</cfoutput>
</cfloop>
many thanks
Oli

Dan, thanks for the reply, apologies not a great post by
myself, as forgot to leave the key details out!
The query below was just a demo of my query (but
unfortunately forgot to put in the group by clause in the post - it
is in the production version!!) However my real question should
have been is it possible to join 2 tables from different data
sources? As I now realise that I would be able to achieve what I
wanted without looping with a sql join, however the stats are kept
in a seperate database, is there a way in coldfusion of joining
tables from 2 different datasources??
many thanks
Oli

Similar Messages

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • 6/8 Beta Monkey loops do not show up in loop browser

    I installed the loops, created new song in 6/8 time, but they will not show up in the loop browser. I can drag the actual file in and that worked, but I would like it to work as it is supposed to

    I followed the instructions here to reindex the loops:
    http://docs.info.apple.com/article.html?artnum=107977
    However after that, all the loops were not showing (mainly from the Voices Jam Pack). In the Finder, I see ones called "Nathan Improv" 01-14. However in the Garageband loop browser, I only see 01, 02, 04, 05, 10, 11, and 12. Out of the 1500 loops, it's only showing 429 under all effects.
    Finally found another link: http://www.bulletsandbones.com/GB/GBFAQ.html#noloops
    which had a blurb about missing loops:
    +Also note that loops in a different time signature than your song, will not be displayed. Additionally, by default, the loop browser only displays loops within two semitones of the key of your project. Turning off "Keyword Browsing" in GB's prefs will allow all loops to be displayed regardless of key (the time signature requirement still applies).+
    I turned off Keyword Browsing and was able to see all the loops in Voices that I wasn't able to see before.

  • Loops will not show up in browser

    Im new to Garageband..still, I keep getting a message that no apple loops are installed even though I know they are. I have even installed a Jampack and another set of ProSessions loops. When I try dragging the folders into the broswer, they still do not show..what am I doing wrong?

    I followed the instructions here to reindex the loops:
    http://docs.info.apple.com/article.html?artnum=107977
    However after that, all the loops were not showing (mainly from the Voices Jam Pack). In the Finder, I see ones called "Nathan Improv" 01-14. However in the Garageband loop browser, I only see 01, 02, 04, 05, 10, 11, and 12. Out of the 1500 loops, it's only showing 429 under all effects.
    Finally found another link: http://www.bulletsandbones.com/GB/GBFAQ.html#noloops
    which had a blurb about missing loops:
    +Also note that loops in a different time signature than your song, will not be displayed. Additionally, by default, the loop browser only displays loops within two semitones of the key of your project. Turning off "Keyword Browsing" in GB's prefs will allow all loops to be displayed regardless of key (the time signature requirement still applies).+
    I turned off Keyword Browsing and was able to see all the loops in Voices that I wasn't able to see before.

  • FOR LOOP EXCEPTION not working !!! please help

    Hi,
    Why is the NO_DATA_FOUND execption not getting executed. ????
    Hereis the code....
    CURSOR newreccur IS
    SELECT * from emp_table;
    BEGIN
    v_file_handle := UTL_FILE.FOPEN('out','new.dat','W');
    BEGIN
    FOR emp_rec IN newreccur LOOP
    -- Write procurement records
    UTL_FILE.PUT(v_file_handle,'emp_rec.num');
    END LOOP;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    dbms_output.put_line ('No data found ')
    END;
    EXCEPTION
    WHEN UTL_FILE.INVALID_PATH
    THEN
    DBMS_OUTPUT.PUT_LINE ( 'Invalid Path ' || TO_CHAR (SQLCODE) );
    UTL_FILE.FCLOSE_ALL;
    END;

    cursor for loops do not raise no_DatA_found - they simply stop looping when they run out of data. you can set a variable within the loop, and then check it after the loop if you need to know if data was returned or not.

  • Mountain lion has killed my mac book pro. After downloading and trying to install, I am stuck in a loop of "not enough room to install on this disk" and not being able to access the old disk's data to open up space.

    Mountain lion has killed my mac book pro. After downloading and trying to install, I am stuck in a loop of "not enough room to install on this disk" and not being able to access the old disk's data to open up space.

    Nope. It just opened the installer and stayed in the same loop.
    It tells me to choose a startup disk but the only option is the HD which it will not use because it says it cannot gather enough information.
    Eveything was working fine until the mountain lion failed install.

  • When debugging, a for loop is not entered even though the number 6 is passed to "N".

    I cannot figure out why a for loop is not entered when I debug it. When debugging a value of 6 is clearly passed to "N", the number of iterations the loop is supposed to execute. So when I debug, execution highlighting just parses right over the loop, even though I request to enter the loop. Everything inside of the loop is not executed. Have you experienced this before? - Any ideas?

    As mentioned by "eh" auto-indexed arrays that are empty will cause this.
    A "FOR loop" will itereate as many times as is indicated by the smallest number elements in any of its auto-indexed inputs.
    When you watch it in execution-highlighting, you probably will see a "0" coming in on an auto-indexed input.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • LabVIEW 6.1 If For Loop count terminal is zero then value going through the loop is not passed on to the output of the loop

    Hello, one of our customers just encountered an execution error in a vi running under LabVIEW 6.1, which doesn't exist under LabVIEW 5.1 or 6.01. I have a simple vi that has two encapsulated For Loops. Two string arrays go in, one goes out of the outer loop. Inside the outer loop the first array is indexed. The string which results from this indexing is compared with all other strings from the second string array in the inner loop. If it matches one of the strings of the second array, it is not outputted, otherwise this string goes through the inner For Loop to the output of the inner loop and from there to the output of the outer loop. The count
    terminal of the outer/inner loop is connected to the Array Size of the first/second string array. If the second array is empty, that means that the element in test from the first arry cannot match anything from the second array, so the element in test is send to the output of the inner loop and from there to the output of the outer loop. This works fine in LabVIEW 5.1 and 6.01, but NOT in LabVIEW 6.1. In LabVIEW 6.1 the inner loop is never executed if the count value is zero (which is correct), but the data line running through the loop is not executed either, which is different to what LabVIEW 5.1 and 6.01 do. There, the input string is sent to the output of the inner loop correctly even if the loop counter is zero. The solution is easy - I just have to connect the output of the outer loop to the data line BEFORE it enters the inner loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is supposed to be a feature, but it brings some incompatibility in programming between the
    different LabVIEW versions.
    Best regards,
    Gabsi

    Hi,
    When a for-loop runs zero times, all outputs are 'undefined' (and should
    be).
    Besides, how would LV know what the output of a not executed routine should
    be?
    It might be handled differently in LV5 and LV6, which is unfortunate. In
    both cases, the result is undefined.
    It's not a bug. It's just something that should be avoided in any LV
    version.
    > The solution is easy - I just have to connect the
    > output of the outer loop to the data line BEFORE it enters the inner
    > loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is
    In some cases this does the trick. But if the data is changed in the inner
    loop, this will effect the results if the N is not zero.
    Technically, I think the output in this construction is also 'undefined'.
    But LV handles this as expected / desired.
    Another solution is to use a shift register. If N is zero, the input is
    directly passed through to the output.
    Regards,
    Wiebe.
    "Gabs" wrote in message
    news:[email protected]...
    > LabVIEW 6.1 If For Loop count terminal is zero then value going
    > through the loop is not passed on to the output of the loop
    >
    > Hello, one of our customers just encountered an execution error in a
    > vi running under LabVIEW 6.1, which doesn't exist under LabVIEW 5.1 or
    > 6.01. I have a simple vi that has two encapsulated For Loops. Two
    > string arrays go in, one goes out of the outer loop. Inside the outer
    > loop the first array is indexed. The string which results from this
    > indexing is compared with all other strings from the second string
    > array in the inner loop. If it matches one of the strings of the
    > second array, it is not outputted, otherwise this string goes through
    > the inner For Loop to the output of the inner loop and from there to
    > the output of the outer loop. The count terminal of the outer/inner
    > loop is connected to the Array Size of the first/second string array.
    > If the second array is empty, that means that the element in test from
    > the first arry cannot match anything from the second array, so the
    > element in test is send to the output of the inner loop and from there
    > to the output of the outer loop. This works fine in LabVIEW 5.1 and
    > 6.01, but NOT in LabVIEW 6.1. In LabVIEW 6.1 the inner loop is never
    > executed if the count value is zero (which is correct), but the data
    > line running through the loop is not executed either, which is
    > different to what LabVIEW 5.1 and 6.01 do. There, the input string is
    > sent to the output of the inner loop correctly even if the loop
    > counter is zero. The solution is easy - I just have to connect the
    > output of the outer loop to the data line BEFORE it enters the inner
    > loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is
    > supposed to be a feature, but it brings some incompatibility in
    > programming between the different LabVIEW versions.
    > Best regards,
    > Gabsi

  • Whay FORALL loop is not Working.....

    hi Guys,
    I have created a procedure with Object as Argument.......
    CREATE OR Replace PROCEDURE Object_Student1(p student_detail1)
    AS
    BEGIN
    FORi in p.first .. p.last loop
    INSERT INTO Sample_mix VALUES (p(i));
    end loop;
    COMMIT;
    END Object_Student1;
    This above was not working..........After I have changed the PL/SQL in the INSERT statement....
    CREATE OR Replace PROCEDURE Object_Student1(p student_detail1)
    AS
    BEGIN
    FOR i in p.first .. p.last loop
    INSERT INTO Sample_mix VALUES (p(i).roll,P(i).SALARY,P(i).ADDRESS,P(i).Name,P(i).mobile);
    end Loop;
    COMMIT;
    END Object_Student1;
    now This is Running Successfully.... But After I changed From FOR Loop TO FORALL loop..
    CREATE OR Replace PROCEDURE Object_Student1(p student_detail1)
    AS
    BEGIN
    FORALL i in p.first .. p.last
    INSERT INTO Sample_mix VALUES (p(i).roll,P(i).SALARY,P(i).ADDRESS,P(i).Name,P(i).mobile);
    COMMIT;
    END Object_Student1;
    The Above Code is Not working..... giving the folloing ERRORS...
    LINE/COL ERROR
    5/32 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records
    5/42 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records
    5/54 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records
    5/67 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records
    LINE/COL ERROR
    Could anybody tell me why should This ForALL loop is not Working....??

    Yes Suresgh I tried.... But I got Same Error..... given below...
    1 CREATE OR REPLACE PROCEDURE ObjectPassing2(p student_detail1)
    2 AS
    3 BEGIN
    4 FORALL i in 1 .. p.Count
    5 INSERT INTO Sample_mix VALUES(p(i).Roll,p(i).Salary,p(i).Address,p(i).Name,p(i).Mobile);
    6 COMMIT;
    7* END ObjectPassing2;
    SQL> /
    Warning: Procedure created with compilation errors.
    SQL> sho err;
    Errors for PROCEDURE OBJECTPASSING2:
    LINE/COL ERROR
    5/33 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records
    5/43 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records
    5/55 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records
    5/68 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records
    LINE/COL ERROR
    5/78 PLS-00436: implementation restriction: cannot reference fields of
    BULK In-BIND table of records

  • My LG G3 gets stuck in an "updating" loop and not load new emails. How do I fix this?

    My LG G3 gets stuck in an "updating" loop and not load new emails. How do I fix this?

    If you toggle Airplane mode On/Off, does it resolve?

  • How do I copy just the main region of a looped region & not the loops?

    How do I copy just the main region of a looped region & not the looped bits?
    Sometimes on the last iteration of a loop, I want to make a slight change in the notes, and therefore need to insert and actual copy. When I copy the original region and paste it, it overwrites everything that follows...deleting a whole bunch of arranging that I just did. Is there a command to copy only the original region? Otherwise I have to unloop the region, copy, insert, and reloop the region. Thanks

    Either you have a lot of Pages breaks which you can delete or you have aded a Pages break which you also can delete. Turn on the invisible characters View > Show Invisibles. You will see blue characters.

  • Loop changes notes

    when i make a region loop , the notes in the looped parts are changed.
    what the?

    data-
    the notes all became destructively transposed. very very wierd and I always have my fingers crossed that it doesn't happen again.
    It was my first go at version7 and I had the transpose master track visible.
    There were automation lines in the transpose track.
    But I'm still suprised it was destructively applied.

  • Mount -o loop: option not supported

    Hello,
    I have .TRK file and trying to mount as below.
    User-2:CD Admin$ file IC01.TRK
    IC01.TRK: ISO 9660 CD-ROM filesystem data 'ABCD'
    User-2:CD Admin$ sudo mount -o loop -t cd9660 XY01.TRK /tmp/trk
    mount_cd9660: -o loop: option not supported
    The same is working fine with Linux: sudo mount -t iso9660 -o loop IC01.TRK /mnt/vshare
    Can you help me to undertand the difference and how to mount this file in Mac?
    regards
    MM

    What works in one operating system may not work in another. Read the manual. Try the following->
    hdiutil attach IC01.TRK

  • TS3694 Apple 4s stuck in a loop and not restoring or updating Help please!!!!

    Apple 4s stuck in loggo loop and not restoring or updating. I have tryed all the recomended stuff all the youtube video EVRYTHING!!!!! I cant think of any reasone for it to not work .one minuet it was playing music on my sterio and the next this loggo loop.   HELP PLEASE!! **** YOU APPLE!!!!

    Maybe:
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable              
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar                              
    Or
    Restore loop (being prompted to restore again after a restore successfully completes)
    Troubleshoot your USB connection. If the issue persists, out-of-date or incorrectly configured third-party security software may be causing this issue. Please follow Troubleshooting security software issues. .
    Next try placing in DFU mode and then restoring.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    Then try restoring on another computer.
    Last, make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • Rule loop has not stabilised

    Hi,
    Often I get this error while running rulebase ..
    Rule loop has not stabilised after 2000 iterations.
    at com.oracle.determinations.engine.local.LocalSession.thinkStep(LocalSession.java:739)
    at com.oracle.determinations.engine.local.LocalSession.think(LocalSession.java:784)
    Can anyone know why this error comes?
    Thanks,
    Rajan

    This means you've created a rule loop, but haven't made sure that the chain always has a defined start.
    Make sure that in every case the logic has a shortcut that prevents it looping endlessly.
    Go to the OPM help, and search for "rule loop": http://docs.oracle.com/html/E38269_01/toc.htm
    You will find this topic is the top hit: http://docs.oracle.com/html/E38269_01/Content/Writing%20rules/Model_loops_in_rule_logic.htm
    Davin.
    Edited by: Davin Fifield on 13-Feb-2013 15:29

Maybe you are looking for