• halifaxdal (8/18/2014)


    SQLRNNR (8/18/2014)


    halifaxdal (8/18/2014)


    And why would you want to handcuff yourself like that?

    I like the word "handcuff", that's not by me, it's by the platform itself, I am building a dashboard using Dundas Dashboard:

    When you do not have database privilege, you end up building virtual table through manual method: which means only "pure" select query is allowed with lots of restrictions, and yes, exactly like being "handcuffed":w00t::crying:

    A dashboard that needs to consume 10 million records? That seems like a (to be frank) useless venture. Nobody reviews 10 million records on a report or in a dashboard. If it is a dashboard, it should be pre-aggregated and quickly consumable into a high level style report.

    I'd recommend working with the DBAs who do have access. Show them the query and the table definition that would work. Dump your data into a staging table. Select from that staging table (with the re-defined urls) and group on that.

    Otherwise, try a subquery in a join. But to be fair on that one, you are still consuming 10 million records in a dashboard. People expect that to be fairly snappy. Since you are consuming 10 million records, there will be some wait involved.

    In reality there are cases that you have to work with certain restrictions, and I am glad at least I can seek help from Internet when there is no DBA available beside you.

    And yes, no kidding 10 million records, the dashboard is to report highly summarized info, I have other queries to calculate numbers not posted here.

    I am more interested to see if who can do some magic work on my query to make it faster.

    Thank you.

    So no DBA available, and nobody with access to create a table into which you could dump your results to then aggregate it in this query?

    Have you tried the subquery option that I proposed?

    Nobody can really do much more to help since you haven't provided sample table structures and consumable data to try a different solution.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events