« first day (2040 days earlier)      last day (2829 days later) » 

6:18 AM
@WilliamMariager Yes, SQL Server supports XQueries and yes you can store XML in a table.
If it's a good idea or not is another question.
2
 
Morning all.
Seen on the interwebs today ...
 
7:20 AM
F-f-f-f-f-f-f-f-f-friday
 
8:12 AM
0
Q: Any recourse when bounty not awarded due to honest misunderstanding of auto-awarding?

srutzkyAs it relates to the following question: SQL query failing because of commented part of T-SQL query I posted an answer (the only answer) and worked with the OP over several days on narrowing down the issue and coming up with a work-around, and my answer was accepted. Then, the OP, in wanting an...

 
'The oid column are avaliable in all tables' - well, that's not true unless you create your tables with WITH OIDS. At least not true in recent (last 15 years or so ;) versions. Also, the OP has all these options in there command already, so what does your answer add that they don't already know? — dezso 2 mins ago
 
9:09 AM
@MikaelEriksson It's a rather complicated set of data with hundreds of classes but usually only a few are used. For now the pure XML approach saves me a lot of development time, so I think I'll go with it until I see problems.
 
@WilliamMariager Try some sample queries you expect to run against it, some of them might take a long time and/or consume a lot of cpu
 
I will try that.
It'll help a lot when I can finally get my hands on a larger dataset. I'm currently limited to 4 entries. I could make some mock data I guess, just for testing. I'm not sure how common that is?
 
@WilliamMariager Make sure you won't have to spend a lot more time redesigning it when/if this approach bites you later.
 
Well, as it is, I don't have a say in how the data classes are structured, so at best, this'll work without too much work, at worst I'll have to bite the bullet and setup the db to work properly with the classes.
Would adding an XML Schema help? I have the XSD definitions I used to generate the data classes.
 
10:20 AM
Seen on the interwebs today ...
 
10:40 AM
Schemas in the database will guarantee the structure of the XML you store, called typed XML. Some say it is faster to query typed XML some say it is slower. Both may be correct. There is of course some overhead storing the XML since it has to be verified against the schema.
If you ever need to modify a schema that is used there is a bit of work that needs to be done.
1. Change all columns using the schema to untyped xml.
2. Drop the schema collection.
3. Create a schema collection with the new schema.
4. Change columns back to typed xml using the schema.
 
10:58 AM
Thanks for the advice.
 
 
2 hours later…
1:17 PM
user image
2
 
 
3 hours later…
4:02 PM
@wBob did skills actually suggest it?
i didnt get that impression
 
4:44 PM
@AaronBertrand No problem, happy to help in some small way.
@AaronBertrand One thing I don't think has come across clearly to everyone is that int -> bigint conversions are less disruptive on a heap vs in a btree.
Disruptive in the sense of the amount of logging and duration of the change operation.
In a recent change, it took me about 30 minutes to drop all nonclustered indexes, drop clustered index and constraints, alter column to a bigint, recreated clustered index, create clustered index. Compared with 1 hr 45 min for building a new table w/ clustered index, copying the data, and then recreating the nonclustereds.
(The part about less logging depends on a few different things, granted.)
Kendra's recent post advocates the 'make another table' method. But I'm no longer convinced this is the best way if you can tolerate some amount of downtime.
Your method in P4 is still the best I know of (and probably will be for a long time) if you really need to keep downtime to near-zero.
 
5:21 PM
@swasheck one speculates a little.
 
I guess soon we'll have SQL Server on Linux on Windows.
2
 
6:13 PM
then we'll put the windows kernel inside linux
it'll be hysteria
 
6:48 PM
@ypercubeᵀᴹ cheers!
 
7:22 PM
How's it going folks
 
7:33 PM
Apparently it's going so well that none of you have to be at work at this time. Nice
 
To be honest, I very rarely stay at work till half past ten in the evening.
I think that should mean at least that it's not going too bad for me :)
 
@AndriyM what are you still doing here Friday at 10! You should be drunk somewhere
 
7:51 PM
That's the perverseness of my mind for you.
 
@wBob I love it. #SQLSKILLS KILLS!
 
8:09 PM
For any of those messing around with SO Docs, the t-sql docs are now a part of SQL Server.
 
 
1 hour later…
9:14 PM
@wBob What's this thing about the Joker, SQLskills, and partitioning?
 
9:39 PM
Voted to Close: no mention of a DBMS
3
Q: Is it neccessary to re-create a table in order to partition it?

K. ArriagaI am trying to partition a table using a column that stores dates which already exists in the database. Would I need to re-create the table in order to do this?

 

« first day (2040 days earlier)      last day (2829 days later) »