« first day (1663 days earlier)      last day (2655 days later) » 

8:27 AM
morning
 
9:01 AM
@QuietNaN it will give you only
Select * FROM my_cte
but with
15 rows
 
morning @AndyK
morning all
 
morning @Shaneis
sup?
 
9:41 AM
@AndyK my question was not clear i think.
How works that query:
1. It Selects all rows from Employee into (1000 rows) CTE and than 15 rows are selected From CTE?
2. When CTE is executed it already knows about outer OFSSET / FETCH so only 15 rows are selected once?
 
Hey, I have a question about mysqldump. Will this query lock my tables or slow down the server? mysqldump --add-drop-table --create-options --disable-keys --extended-insert --single-transaction --quick --set-charset --hex-blob --force --user=$DB_USER --password=$DB_PASS --skip-lock-tables -A | gzip > /backup/mysql/$MONTHDAY-$MONTH-$DB_NAME.gz
 
@QuietNaN What database are you using again @QuietNaN, think I asked you before but can't remember
@BartBergmans sorry @BartBergmans, I've started to stay away from MySQL questions
 
@Shaneis Sql Server 2016
 
@BartBergmans no it won't work
 
@AndyK Why?
 
9:52 AM
do a try with the following cat <any_text_file> | gzip > whaevertheoutputname.gz
 
But my gzip works, the only problem is that my old mysqldump command locked tables
And then my application would become unavailable for a small time
I used: mysqldump --opt --hex-blob --force --user=$DB_USER --password=$DB_PASS -A | gzip > /backup/mysql/$MONTHDAY-$MONTH-$DB_NAME.gz
 
what do you mean your tables are locking?
oh I see
 
When I use mysql dump with --opt it locks a big table
 
9:56 AM
first you have many options
 
Yes thats the --opt command without locks
 
can you do a test without all the options and see what happens?
 
I just ran the command. Everything still works. Hooray!
 
good man, good man @BartBergmans
 
Weird thing is, it also created a --skip-lock-tables file with 0 bytes..
 
10:10 AM
@QuietNaN oh yeah, it's hard to say to be honest...CTEs get "inlined" so they basically get turned into 1 command...so you're query becomes SELECT ID, FirstName, LastName FROM Employees OFFSET 0 ROWS FETCH NEXT 15 ROWS ONLY;
The only problem is it's different from a TOP so it's hard to say if the plan is different...can you get an actual execution plan?
 
mysql way of doing things most likely
@BartBergmans does the file stay after your dump is zipped?
 
if you change it to another extension like filename.old, does it create issue?
 
@Shaneis in execution plan when i use TOP 15 over CTE it shows that Esitmated Number of Rows are 700+, but if i used OFFSET/ FETCH and remove TOP 15, it shows Estimated number of rows are 15. So it means TOP 15 on CTE actually selects all rows and than picks 15, where OFFSET/FETCH selects exactly 15 right?
 
what?... I'd be very hard pressed to believe TOP 15 selects all rows!
there is this thing in SQL Server called "row goals"
top 15 will stop after 15 unless you've an order by in there
 
10:19 AM
Select top 15 * from myCTE (actual: 15, estimated 700+ rows)
select * from myCTE
order by 1
offset 0 rows fetch next 15 rows only (actual 15, estimated 15 rows)
 
Hi
How to get transaction log file path
in SQL
 
@tHiNk_OuT_oF_bOx do you have SSMS?
 
Yes. And more thing
How I can get the transaction execution time
using the Query
like at what time transaction executed
 
@QuietNaN estimated versus actual
so they both read 15 rows, but the top estimated more...
what is the number of rows read?
@tHiNk_OuT_oF_bOx in a SELECT stmt?
 
yes
@Shaneis
 
10:29 AM
file names
 
@Shaneis there is no information shown about Number Of Rows Read, only actual/ estimated
 
SELECT name, physical_name FROM sys.database_files;
 
@Shaneis
I need info regarding the transaction
 
@tHiNk_OuT_oF_bOx get yourself a third party tool. There is a way using DMVs (SELECT session_id, start_time FROM sys.dm_exec_requests;) but you'd have to really know them to get all you want
@QuietNaN you're on 2016, when you hover over the execution plan there should be something like this...you'd have more info though as you are a later edition
@tHiNk_OuT_oF_bOx what transaction?
 
@Shaneis i already wrote that about those, i said that Number of Rows Read is not shown, only Actual / Estiamted
Actual means how much was read?
or estimated
 
10:36 AM
yeah and I'm saying that since you are running sql server 2016 you should have more info
actual means how much was read
estimated means how much SQL Server thinks it will need to read
 
oh i am not dba, i am application developer
just my db is not at job
so i came here to ask till he comes
 
what's the results of this @QuietNaN
SELECT @@VERSION
 
SQL transaction
like begin tran
I wanted to check when transaction started
and ended
 
brb getting coffee
 
@Shaneis ouch 2014, thought it was 16 ^^
@Shaneis sorry i forgot that i have local 2016, and was connected to 2014
in 2016 local DB it on both queries with TOP and OFFSET/FETCH shows numebr of rows read 15
sorry for wasting your time))
so even if 2016 shows more info, in 2014 this CTE will read 15 also right?
 
10:58 AM
@QuietNaN no worries
@QuietNaN they should return the same results
 
ok thanks
@Shaneis when i am using Paging, there is no way to aviod 115 rows read if i only need 15 after 100 rows right?
 
I sincerely doubt it but there could be something out there who got around it that I haven't read yet
 
@QuietNaN Always a good place to check :)
 
 
2 hours later…
1:00 PM
back
 
 
1 hour later…
2:24 PM
@AndyK you didnt' miss much man
 
 
2 hours later…
War
4:04 PM
@AndyK that stuff came back and bit me in the arse today ... that hierarchy permissions thing
 
@War
just brought up the old website
 
War
hi :)
 
hey @War
 
War
yay ... sounds like you're beasting along!!!
 
my knowledge about html , css and dns were rusty
but I managed to bring that sh** up
sounds insane man
since I've been here
 
4:06 PM
hi, How would I be able to search both ImageName column and CategoryName column without returning 2 rows with one search (given they both match)?
AND (i.ImageName LIKE '%' + @SearchTerm + '%') OR (c.CategoryName LIKE '%' + @SearchTerm + '%')
 
War
@AndyK :) nice"
 
there are so much shit that's been piling up that when you move one thingy, everything is falling down
 
War
what cms did you use in the end?
 
mean everything
no cms yet
good old html
 
War
hmmm ok
wow that's hardcore man
 
4:08 PM
let me show you
fucking hardcore
 
War
I'm starting to build out my CMS functionality the past few days
for work & my own framework at home
 
I need to code
more
they are truly doing sh** work here
man @war , I wish I can learn more about what you're doing
it can help me
 
War
I'd be happy to help :)
that's why me and @ElieSaad created the architecture chat room ...

The Web Stack & Architecture

Awesome stuff from the minds of the crazy through careful use ...
I'm always in there ... not much activity of late though
planning to do a ton of clean up work soon so I can get a base "product range" up and running
gonna build a few bits like content & document management systems, CRM, ERP sort of things
just to give people "templates" using my core web stack
 
@JoJo what database are you using
@War welcome back Chief Rubber Duck!
 
War
hey @Shaneis :)
been a bit buried of late
getting back in to my flow now though
working on my web platofrm for so I can get that blog up soon
 
4:33 PM
@War ah no worries!
Blog? Who even mentioned a blog!
 
War
not me
 
@War ...
blog?
 
War
yup blog
working on my UI framework now so I can get a blog built in the new year
hadn't realised I was this far behind on the UI work tbh
 
Hey mates when i am working with CTE
WITH Employees_CTE
AS
( Select ID, FullName FROM Employees)
is it better to have
 
@Shaneis SQL SERVER 2008 R2
 
4:37 PM
SELECT * FROM Employees_CTE
or
SELECT ID, FullName FROM EMployees_CTE
 
@QuietNaN Performance wise I wouldn't say it makes a difference since you're already specifying the columns in the CTE...but I like the second option...best to get in the habit of writing out the queries
 
@Shaneis noone will say that i am wasting time writing addition code when i will not gain performance ? ^^
 
@QuietNaN nope, if they do, they are being pedantic...people may give off for seeing an '*' is code but even then they're being pedantic...
like I said, I'd err on the side of the column names
 
okay thanks :))
 
War
@QuietNaN avoid using select *
try to be explicit at all times
Well EF did it to me again
pure evil IMO
 
4:55 PM
@War yeah, hate when that happens
 
War
Why do I always have complicated problems
 
@JoJo quick question...what do you want to happen when your rows are like this
 
War
what's wrong with the usual stuff like basic syntax errors :(
i don't seem to get those any more !
 
@Shaneis well for example if I named the image 'orange baloon' but it is also in the category named 'Orange' I just want it to return one row
 
@War you have gone beyond the realm of syntax errors my friend!
no basic errors shall follow you down this dark path any longer!
@JoJo sounds like it will.. do you have an example where it IS returning 2 rows?
 
War
4:59 PM
@Shaneis I don't know if should be proud of that or fear it
 
@War yeah I got no idea either...I'm scared anyway
 
War
"message": "The nested query does not have the appropriate keys.",
"type": "System.NotSupportedException",
in other words EF went ... yeh, no ... I aint working that out your LINQ is too much mate!
 
@War Permission to say "All LINQ queries are too much", sir!
 
War
neva!
LINQ == AWESOME!
 
Sir, yes sir! Happy to hold my tongue sir!
stupid LINQ
 
War
5:09 PM
exec sp_executesql N'SELECT
    [Extent1].[Id] AS [Id],
    [Extent1].[ParentId] AS [ParentId],
    [Extent1].[Name] AS [Name],
    [Extent1].[Path] AS [Path],
    [Extent1].[Layout] AS [Layout],
    [Extent1].[Content] AS [Content],
    [Extent1].[Script] AS [Script]
    FROM  [dbo].[Pages] AS [Extent1]
    CROSS APPLY [dbo].[GetPagePermissions]([Extent1].[Id], @p__linq__0) AS [Extent2]
    WHERE [Extent2].[Read] = 1',N'@p__linq__0 int',@p__linq__0=1
its not pretty but it's reasonably good sql :)
 
I got no problem with that SQL
 
War
like i said ... it's good sql, just not "pretty"
I wouldn't name params things like @p__linq__0
but other than that I can't really fault it
where stuff gets evil is the combination of that with OData
and OData does some really ugly stuff
 
@War WOAH WOAH WOAH WOAH!!!!
don't tell me here!!!
Save it for the blog!!!
anyway I'm heading!
talk to ya again
 
War
:(
 

« first day (1663 days earlier)      last day (2655 days later) »