‫So what is the largest sequel query that we can send to this server?
‫Let's find out in this video.
‫All right, guys, so this video, I want to know what is the largest sequel that we can send before
‫the database server actually stays there and dies?
‫OK, this is what we're going to find on this video.
‫I'm going to I'm going to basically form a sequel that basically have an idea in equal one or it's equal
‫to or until it gives up.
‫So I'm going to try multiple times until we get an answer from the server and I'm going then I'm going
‫to look at Wireshark and convert that into.
‫How many TCP segment did we assemble in order to send that query?
‫OK, so let's go ahead and just send a normal query here.
‫I have no Jass and my databases posts gress and I'm using elephants equal as a service on the backend.
‫So we're going to do this.
‫And simple query.
‫This is the table right now.
‫Nothing fancy.
‫Have you query if you rows and this is this is the Warshak.
‫We did a set very, very similar video on them on this channel showing Warshak and Posterous and what
‫happens exactly.
‫This is the syndication part and this is the queue.
‫This is a query and this is the very simple query.
‫I took one Tsipi packet to send the square.
‫I'm going to go ahead and clear that thing and.
‫Right, a little bit of code and we're going to do we're close where I'd equal one and then just do
‫a simple loop that I equal zero eyes, less than one hundred plus plus.
‫And then we're going to do where equal or plus equal value to it or I'd equal.
‫I keep forgetting the text.
‫There you go.
‫I said, so this will basically this is the initial value and we're going to keep I just appending to
‫the workless and finally going to do this.
‫This is where obviously we have to where I'd equal this.
‫I was good.
‫And Knackery, this has and let's actually print that query so we can see how.
‫Console log, sequel to it, boom, right?
‫That's not bad.
‫Let's clear this and send it again.
‫Boom.
‫What we did, we got a cue and we have assembled still one one DCP Beckett, I'm all right.
‫It's a thousand bytes, almost one kilobyte.
‫All right.
‫Let's increase that to a thousand.
‫Let's see what will happen.
‫Save and spend.
‫Oh.
‫All right, let's do this again and send a thousand with a thousand elements of our query.
‫Has nine assembled Tsipi segments?
‫All right.
‫OK, nine Tsipi segments, and obviously the more Tsipi segment, the more action you're going to receive
‫from the server and you have to assemble to pack all the stuff like that.
‫It's I bet you these are not in order at all.
‫Look at that.
‫This is obviously an accumulation of all of them.
‫So still, we didn't get an error with thousand.
‫How about ten thousand?
‫Astarte Ten thousand.
‫And let's clear Wireshark.
‫And then do it again.
‫Boom, oh, 10000 inquiry actually succeeds.
‫Wow.
‫All right.
‫So you can send.
‫And how about we actually print the length and bites, right?
‫How do you do that?
‫That the length?
‫All right, so for simplicity, I'm going to divide this into one thousand twenty four so we can get
‫into them and let's show that in kilobytes because we.
‫CaBi, right?
‫I guess I could have done that online, but sure, look at that one twenty five kilobyte, right.
‫Let's see how this looks like an wireshark.
‫Do it again.
‫One twenty five kilobyte, one security.
‫Oh, my God.
‫Look at all these retransmissions.
‫I this is I don't I can't even find the quake.
‫And you guys, I can't find the query.
‫Where's the query.
‫There you go.
‫It took me a while to find the.
‫It's 90 assembled TCP segment.
‫It doesn't tell me the total length, but we know the total length as well as on, what, one twenty
‫five kilobyte.
‫How about we increase that to a hundred thousand?
‫No, right, and see, does it fail, does it fail, it's around a MEGG.
‫It's one Megg, one point three megabytes Quarrie, and it also succeeds.
‫Wow, badass sequel Postgres man, I did not know that or that's a long statement.
‫One make worth of Quarrie.
‫Wow.
‫OK, how about that.
‫How long is one Meg?
‫One mega choir, let's find it.
‫Can I search and find this?
‫Oh my God, 960 Tsipi Packards.
‫You know, this is a bad idea.
‫When you have a long career, it goes right because you so how how slow it is, because every kid has
‫to be acknowledged and and they have to be recorded if the order is lost.
‫So nine sixty packet is a lot of packets.
‫All right.
‫Are you guys ready for the million.
‫Is that a million?
‫Know, she's it is a million, one million elements, one million element.
‫Let's do it, Bo.
‫Let's clear this.
‫Are you guys ready?
‫Let's do it, one million element to.
‫That's oh, my 14 megs four oh oh oh, look at that, it's stuck, they did fail.
‫The guys think it failed.
‫Do you guys think it failed or are we still descending?
‫Oh, my gosh.
‫Oh, I don't think it failed, I just thought that there was an error that we couldn't handle a million
‫rows, which is a 14 mix.
‫But what happened?
‫And did we actually send all the way we need to send and the client just gets up?
‫Let's take a look.
‫We didn't even give that man look at that.
‫We crashed the server, guys, we crashed the server.
‫So look at that terminating connection because of the crash of another server.
‫Another quote unquote, another I'm pretty sure it does.
‫We just crashed it.
‫The postmaster has commended the server process to roll back that kind of transaction because another
‫server is another service processor, crushed a abnormally in the moment.
‫You should be able to reconnect to the database and repeat your comment.
‫I just thought that I think the number of packets received by the server has just overwhelmed the server
‫and that just died.
‫And because I have the free instance on one my elephant sequel, I bet that if I have like a better
‫instance, I bet that I can send a larger.
‫Let's try this one more time, guys.
‫How about that?
‫Try one more time.
‫But look at that.
‫It's actually stock.
‫We didn't even reach one million, did we?
‫We didn't the assemblage of the clients and just Sinden, I guess maybe the console, the log, we couldn't
‫print more than one million element, but.
‫Look at that.
‫Oh, no, it's just dying, man.
‫Yeah, it does not like that one bit.
‫Yeah, I get this now.
‫Now the process is stuck at the client side.
‫Yeah.
‫All right.
‫It's probably a bad idea to send the millions.
‫I'm going to kill this process.
‫All right, guys, my machine just died.
‫All right.
‫So we know 14 megs worth of aquaria is a bad idea.
‫And you can see my my MacBook is now spinning up.
‫I don't know if you can hear that, but it's a bad idea.
‫And have you ever guys, what is the longest or the largest?
‫Ha ha ha.
‫Hopefully my recording just doesn't die, but yeah.
‫What is the longest square have you ever sent?
‫Let me know in the comments section below before this recording crash.
‫I'm going to see you in the next one.
‫You guys say awesome.
‫Goodbye.