Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 8 of 8

Thread: Performance questions

  1. #1
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default Performance questions

    Greetings All,

    I have a couple of questions about performance.


    1. I have an xmlpackage which queries the DB for the top 3 bestselling products in the past 7 days for a given category. I then display these on the category page. If there have been no sales (or less than 3) - then I'd like to extend the search to the previous 14days & then the previous 30 & then 60 etc - until I get 3 results. I realise I could achieve this by having multiple queries in the xmlpackage but I'm wondering what the performance implications are of this & if there's a better way?

    2. I have an xmlpackage which displays just one product in a specific way - I call this xmlpackage from quite a few pages & just pass it the productid - what are the performance implications of this - let's say I call this same xmlpackage 12 times on the same page - I know this will result in 13 DB queries (the one for the page & then the 12 times this xmlpackage is called) - but is that a big deal?


    I'd be grateful for your thoughts.


    TTFN

    BFG

  2. #2
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Anyone have any thoughts?


    TTFN

    BFG

  3. #3
    Richnyc30 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    340

    Default Boolean algebra

    This was a typical homework assignment for studying how circuits are designed using Boolean algebra.
    Once the Boolean diagram is made the programming is fairly easy and coherant.

  4. #4
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    I'm not sure I follow?
    I'm comfortable with creating the code - I'm asking about the performance implications.............



    TTFN

    BFG

  5. #5
    Sean is offline Member
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    90

    Default

    This is an intriguing topic, especially the math and logistics behind it (sorry I couldn't add anything of use).
    /// Sean ///

  6. #6
    maxmedia1 is offline Member
    Join Date
    Aug 2007
    Posts
    43

    Default Performance Question

    We recently ran into the same question after building a fairly sophisticated template with lots of queries. What we ended up doing was calling a single stored procedure with parameters, and did the successive queries from there rather than multiple calls from the template.

    Not sure if it is applicable, but that is where we did it.

  7. #7
    Dimmer is offline Member
    Join Date
    May 2008
    Location
    London
    Posts
    40

    Default

    I am a firm believer that the fewer calls to the database the better.

    As the products probably only need updating daily, I would run an sp overnight and add the results to the category in extensiondata and simply read the products from there when you get the category info.

    Obviously your method would be required if you need realtime info.
    Alan
    Version (Code/DB): AspDotNetStorefront ML 7.1.0.0/7.1.1.0 - with modifications
    www.stuff-uk.net

  8. #8
    Ash is offline Member
    Join Date
    Sep 2007
    Posts
    55

    Default

    I think that if you did all of the number crunching on the database itself then you'd have very little if any performance hit. Especially if you're only running it once per day.