| |
| |
| |
|
Page: 1 2 3 4 5
Comments:
<0> ok got a question <0> http://sql-servers.com/nopaste/?show=331 <0> view code is there <0> this table in the view SOP030300 <0> has like 6 mil rows <0> select sum(PRICE) From vSalesOrderItems <0> this query takes like 5 minutes <0> how could i make it faster <0> i tried putting an index on the 4 cols in the view, but doesnt help <0> doesnt seem to be using it <0> am i invisible? <1> yeap <1> or you just ****, im not sure <0> well help me out either way <1> I dont know mssql <2> damn I need to add some indexes here :-\
<0> why would this view not be using the index i created on the same 4 columns? <2> how do you know it's not? <2> 6M rows takes a while to process <0> cause im looking at the execution plan <0> all it shows is a table scan of the main table <3> anybodyhere us mse sql 2k5? trying to figure out how to set the compatability level . getting an error specified @subsystem_name SSIS does not exist when trying to copy a database from a ms sql 2k server to a mssql 2k5 <4> 0y <4> ok... <4> so anyone know about coalescing records? <4> specifically i've got (Record 1: [1] <4> er.. <5> what is a "coalescing record" ? <4> specifically i've got (Record 1: [1][2][NULL][6]) and (Record 2: [1][2][9][NULL])... need to combine into [1][1][9][6] <4> can't do distinct cuz neither one will catch <4> could do @var=SELECT TOP 1 for each... but for a lotta records, it gets ugly (technically the last two fields are data, and the first two fields are FK identifiers... so they'll be joining against another dataset)... <5> use min/max? <4> ? <1> why can you use sum? <4> hm <4> another great suggestion! <4> dude <4> that's perfect <4> SUM for the FK identifiers <4> hm <6> CoderMan, it may actually be more cost-effective to scan; it depends on many factors <4> thx coj... it'll take some playing, but that could work quite well <4> lvk: what's your idea w/ min/max ? <1> yay! I did work today <2> how are you going to put that together, to apply MIN to the SELECT and then stuff them together? <3> does SSIS exist for sql 2k ? <4> does min() catch NULLs or not? <5> same as with SUM just use MIN or MAX instead <6> no <4> hm <3> does SSIS exist for ms sql 2k ? <6> DTS <4> yea might use min/max instead just to be sure i don't accidentally combine data... but the general idea from you two is a *LOT* closer than i was :) <4> thx <3> would it be called SSIS in MS SQL ? or is that new terminology for sql 2k5? <1> min/max wont return null unless all rows are null I think <3> cause i'm getting the message the subsystem "SSIS" does not exist. <4> coj: yea that's sort amy thought <4> Arrakis: new to 2k5 <4> Arrakis: before 2k5 the solution was DTS <3> ok <6> Arrakis, you can run DTS packages on 2005, but you cannot run SSIS packages on 2000 :( <4> true <4> DTS would be backwards compatible :) <3> yeah :S TheGamble - i'm trying to do a "database" copy <4> or rather... forwards compatible, i guess <3> i copied the tables via export data <6> heh; cruel joke by Microsoft <3> but it wouldnt let me choose to copy FK / default values <3> so i have 20+ tables that all fail are are no longer related because this **** didnt get transferred over <6> yes, 2000/2005 is not a painless transition <3> I am finding that out :( <3> i wonder if maybe i need to have sql 2k push it to sql 2k5 <3> instead of have sql 2k5 pull from sql 2k <4> hehe <4> prolly a *ton* easier <2> aahh push it / PUSH IT REAL GOOD
<4> though there are some new capabilities that you might be expecting <1> heh <4> it's a question of "requirement" or whatever for the app <3> well the web server has sql 2k5 and .net 2.0 <3> so i gotta pull all of this crap out of 2k and into 2k5 <3> which for the most part worked after 24 hours of gruelling shoveling <3> but i find out that all referential - all the default values - constraints and **** - didnt get tnrasferred over <3> i wonder if its possible to just script the alter table **** <3> and apply that <6> We are currently reviewing the whitepapers and developing transition plans <2> now I have that Salt-n-Pepa song stuck in my head <6> hahaa <2> Can't you hear the music's pumpin' hard like I wish you would? <2> Now push it <2> and damn it these tables need indexes! :-\ <3> hmm <3> looks like i can't <6> haha!!! <2> stupid ***backwards ERP retards <3> i would have hoped sql 2k <3> cvould have at least conected to it <3> i mean <3> hugg <6> I have a feeling that I have not felt all of the pain yet. One database in particular is bound to be really 'fun'. <2> I'm dealing with a 90GB database with 183 tables AND NO INDEXES <3> well at least you knew thbat was going to be a whorry bitch <3> this was supposed to take 5 ****ing minutes <6> ****s <2> my boss expects me to come up with this **** in 5 minutes <6> cubert, how did you inherit 90GB of data with no indices? <2> I'm just reporting from the data <2> it's our ERP system <6> the ERP system has no indices? <2> the ****tards who created it did it originally way back on System 36's, then "upgraded" through the past 30 years <2> here's an example of the SQL I have to deal with, it'll probably look familiar: http://sql-servers.com/nopaste/?show=322 <3> --------------------------- <3> SQL Server Enterprise Manager <3> --------------------------- <3> SQL Server registration failed because of the connection failure displayed below. Do you wish to Modify anyway? <3> To connect to this server you must use SQL Server Management Studio or SQL Server Management Objects (SMO) <3> --------------------------- <3> Yes No <3> --------------------------- <2> I think you've helped me with this <4> is there an easy way to say "select field7 of max(field2)" or something? <4> so you use field2 for the max, but it returns field7 <3> ohhh the bastards <3> like select max(isnull(field2,filed7)) ? <4> i know it can be done via joining against itself <4> no.. like return field7 on record containing max(field2) <4> i don't care about max(field2) except for the max comparison... i WANT field7 <3> isnt that going to give you some aggregat error ? <4> yes! <4> which is why i'm asking <2> heh <3> lol <4> i can do select x where PK in (select PK,max(field2)) or something <4> but was hoping to avoid the subselects since it *should* be a fairly simple operation <7> :O <7> i <7> i was kicked! <2> why do you care that max(field2) is returned? can't you just return it and ignore it? <3> dang <3> you're on a roll - kicked and killed all in the same day <4> cubert: hm <2> you're only going to be getting one record anyway, right? <4> yea <2> or do you want all of Table1 that matches max(field2) in Table2? <4> no just the one record <4> was thinking cuz it was joining... but i can prolly just put JOIN target ON MAX(field) or somethin <3> well sql 2k5 can't push lol <2> SBrick98: or use a CASE
Return to
#sql or Go to some related
logs:
#unixhelp yum segmentation fault parsing package install arguments #flash #windows #politics #beginner #beginner Toress from argentian
#nhl suse check-link-speed
|
|