« first day (3025 days earlier)      last day (1846 days later) » 

7:52 AM
morning
 
Morning
 
8:13 AM
Welp. This is how it all ends guys. Planet of the Apes ending confirmed for this timeline
 
8:56 AM
Morning
 
 
5 hours later…
2:01 PM
morning
 
@George.Palacios half the people on Twitter are already monkeys.
 
afternoon
does that command makes sense to you?
psql -U user -d db_name -c "Copy (SELECT * FROM temp_app_question) To STDOUT With CSV HEADER DELIMITER ';'; ENCODING 'UTF8'" > foo_data.csv
I'm trying to export a table into a CSV file with UTF8 formatting
ping @ypercubeᵀᴹ
I'm using postgres
 
why not \copy?
 
@AndyK is there an extra ";"?
 
@dezso because the ops want to use a bash script (don't ask)
 
2:14 PM
DELIMITER ';'; ENCODING
DELIMITER ';' ENCODING
 
@JackDouglas should it not be running like SELECT * FROM table_name;?
 
psql -U user -d db_name -c "\copy (SELECT * FROM temp_app_question) TO 'foo_data.csv' WITH (FORMAT csv, HEADER, DELIMITER ';', ENCODING 'UTF-8')"
 
@dezso great stuff. tahnks
 
2:55 PM
@MaxVernon Pahaha. More than half
 
3:24 PM
Drop the index is literally the best answer hahaha
 
@George.Palacios cheers
3 messages moved to Trash
@George.Palacios I get the feeling that answer will end up being wrong when we find out what the OP is actually asking.
 
@MaxVernon Oh most definitely. It's still correct right this second though.
 
interesting that it has no upvotes, though.
 
@MaxVernon I have no idea what you mean
@MaxVernon Plenty of upvotes
 
@George.Palacios you're a scholar and a prince.
 
3:35 PM
@MaxVernon Well technically my last name IS spanish for Palace
 
ahhh, yes
lol
@George.Palacios I see now, why you asked about queries. I should specify that I don't always want a seek and I understand that a scan is better in some cases (otherwise why would be have it). The table contains about 60GB of data due to row size (several million) multiplied by the varchar(MAX) (which contains strings that are 16000+ characters long). Before inserting into the table, a scan is done to ensure no duplicates are insterted (matching on Header for elimination and on FullVariables). Then the table is joined in several views on the ID field where the seeks are desired. — dev 2 mins ago
 
@MaxVernon I'm not sure how, but I know even less than I did before
 
this bit: "the table is joined in several views on the ID field where the seeks are desired"
probably nested views, too.
 
Missed that completely.
It's like the message is "The queries don't matter"
 
4:33 PM
@George.Palacios @MaxVernon best answer in this case ;)
@George.Palacios isn't it plural? So palaces?
We should ask @Lamak.
 
it is plural
 
4:48 PM
@maxvernon @George.Palacios I seem to recall that If 2 indexes satisfy a query the same way Sql server will pick the one with the most recent stats
 
5:16 PM
@TomV also see Aaron's answer
> However, if the coin flip as we'll call it involves the choice between a non-clustered index and a clustered index, and again both indexes properly satisfy the query, SQL Server will always lean toward the non-clustered. Why? Because it's guaranteed to be no wider than the clustered index.
 
Yeah I don't underderstand that really
 
@TomV It means that a CI is basically the same as a NCI with (id) INCLUDE (a, b, c, ..., z)
(assuming for clarity that (ID) is the CI
 
If the table definition is correct I mean
They should be the same and I would expect sql to know that
 
SO, SQL Server knows that if both CI and a NCI cover a query in the same exact way, then the NCI (any NCI) will be less wide than the CI or in the worst case (as in this table def) exactly the same. So it is safe to use the NCI.
 
That I see
In any case I don't think either plan should cause major dirrerences in his question is telling us everything. I suspect it isnt
 
5:23 PM
Got to go now, I will be online later (and hopefully on wifi on the train)
 
But what can we do without a plan
 
@TomV yeah, I agree. The index is just a duplicate of the CI.
 
We need a plan!
 
@JackDouglas When did all the SQL Server versions come back to db<>fiddle?
Has there been a development?
 
Ah that reminded me @JackDouglas
 
6:13 PM
@TomV yah, it's a bit of a black box. I wonder if Paul will say anything interesting.
 
 
3 hours later…
8:43 PM
Looks like SO are having fun* upgrading their servers
 
@PaulWhite No except I wanted to make sure those kind enough to donate weren't suffering from not being able to test stuff on SQL Server 2012 :)
 
9:03 PM
You may not be so interested to know we also have MySQL 5.6 and 5.7 now…
 

« first day (3025 days earlier)      last day (1846 days later) »