Are the posted questions getting worse?

  • Steve Jones - SSC Editor wrote:

    drew.allen wrote:

    But it's easy enough to clean up.  Just REPLACE(REPLACE(@sql, '1=1 AND ', ''), 'WHERE 1=1', '').  So if there are additional conditions, you remove the 1 = 1 and the following AND, otherwise you remove the WHERE 1 = 1.

    Drew

    True, but two issues.

    1. No where and this errors out. I have [select .... where order by xxx ]
    2. This code is part of what's buried in plug ins or Project Nami, and we need an author to take a PR and update their code. Otherwise, all upgrades break.

    It is a good idea, and something that I hope we'll implement, but it's not as simple to change as you think

    I think the optimiser will evaluate WHERE 1=1 at compile time. So removing it would make absolutely no difference to the performance of the query.

  • This does change some parameterization stuff, but I think it prevents simple mode, which I'm not sure would be used here. Not sure, and haven't dug into this as other work is still ongoing.

  • Steve Jones - SSC Editor wrote:

    drew.allen wrote:

    But it's easy enough to clean up.  Just REPLACE(REPLACE(@sql, '1=1 AND ', ''), 'WHERE 1=1', '').  So if there are additional conditions, you remove the 1 = 1 and the following AND, otherwise you remove the WHERE 1 = 1.

    Drew

    True, but two issues.

     

      <li style="list-style-type: none;">

    1. No where and this errors out. I have [select .... where order by xxx ]

     

      <li style="list-style-type: none;">

    1. This code is part of what's buried in plug ins or Project Nami, and we need an author to take a PR and update their code. Otherwise, all upgrades break.

     

    It is a good idea, and something that I hope we'll implement, but it's not as simple to change as you think

    I don't see how you are getting SELECT ... WHERE ORDER BY xxx assuming that you are starting with SELECT ... WHERE 1=1 ORDER BY xxx, the first replace won't match, because there is no trailing AND, so it will leave you with the original string and the second will produce SELECT ... ORDER BY xxx, because the WHERE is included in the matching string 'WHERE 1=1'.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Ah, you're right, Drew. I was thinking this was a code replacement that would leave the WHERE, but that would work. However, it's also a PR to upstream modules, not something we want to change directly.

     

  • Oracle driver oddities: create table as select * @from_dblink 1 minute. SSIS select * + rowcount: 80 minutes with Oracle Oledb 🙁

  • Jo Pattyn wrote:

    Oracle driver oddities: create table as select * @from_dblink 1 minute. SSIS select * + rowcount: 80 minutes with Oracle Oledb 🙁

    Does the SSIS time go down if you use a column list instead of *?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Doesn't seem to make a difference. I'll have to try it in a proper testing environment

  • The normal Oracle drivers for SSIS are really slow. The worst part is that it seems to be by design. I had far better luck exporting to a flat file and getting data from there.

    Have you tried using the Attunity Connectors?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Jo Pattyn wrote:

    Oracle driver oddities: create table as select * @from_dblink 1 minute. SSIS select * + rowcount: 80 minutes with Oracle Oledb 🙁

    Is this on an on-prem or in the "foggy" (cloud)

    😎

     

  • Is on-premise. Tried the Attunity Connectors but can't find how to use expressions (SQL command from variable) for incremental updates.

  • I've found that using the latest Oracle drivers is much more efficient than the MS drivers, is that an option?

    😎

    BTW: in a recent project, I experienced up to 10x difference between different drivers 🙁

  • OK, why do I do this to myself?

    Watched the Lions game (US football / NFL) yesterday, and the Lions did Lions things...

    They seem to always find some way to lose, whether it be blown calls by the refs (Green Bay game,) or they just manage to shoot themselves in the foot.  Worse, they seem to find ways to tease the fans (me?  I'm a Lions *watcher,* not a fan) by one week losing a game they should've won easily, then the following week pull a win out in the last 4 minutes of the 4th quarter against a team they have no right beating...

    I don't even have the excuse of playing in a fantasy football league and therefore needing to keep up on games.

    On the other hand, though, knowing how the Lions play, I know it's a good time to get a nap in on Sundays...

  • jasona.work wrote:

    OK, why do I do this to myself?

    Watched the Lions game (US football / NFL) yesterday, and the Lions did Lions things...

     

    I think you are rubbing off on Denver. We seem to do Lions things as well.

    Had an interesting debate with someone the other day. Is Stafford a good QB? Does nice things, has almost 2:1 TD/INT ratio, 40k yards in 10 years not bad, decent rating. However, can't get the team to win. Would we want him in DEN, now or knowing his career would go like this? Not sure. Course, I think he's better than Flacco, but not sure.

    I am constantly amazed by the Lions. Have thought they'd have good years a few times, but can't seem to hold it together. Makes me think the org just has issues, as DEN does now.

  • Steve Jones - SSC Editor wrote:

    I am constantly amazed by the Lions. Have thought they'd have good years a few times, but can't seem to hold it together. Makes me think the org just has issues, as DEN does now.

    This bit brought to mind a thought I've had occasionally.  The Lions have players that sound good on paper, or based on their stats when they played on other teams, but then they get here and just seem to forget how to play football.

    You'll have a receiver that when picked up by the Lions (either from the draft or from another team) has been putting up great numbers, but then goes 1 for 10 over the season.  Lions release or trade the guy, another team picks him up, and he's turning in 7 for 10 or the like.

    It's got to be at least partly an organizational thing, there almost has to be a miasma about the Lions that just causes anyone involved in it to lose some portion of their skills.

  • Vikings will be hard to watch Thursday.

    Which team will show up? Nothing scarier for a Vikings fan than a game they shouldn’t lose.

Viewing 15 posts - 64,066 through 64,080 (of 66,815 total)

You must be logged in to reply to this topic. Login to reply