1 00:00:00,720 --> 00:00:02,890 ‫All right, Korn's is the thing perfect? 2 00:00:02,970 --> 00:00:06,150 ‫No, sir, nothing is perfect, so. 3 00:00:07,600 --> 00:00:13,620 ‫So what is the bad thing about partition updates that move rose from one position to another? 4 00:00:13,900 --> 00:00:14,490 ‫She's slow. 5 00:00:14,860 --> 00:00:19,150 ‫So now updating roads are no longer a straightforward thing. 6 00:00:19,150 --> 00:00:22,440 ‫Guys, think about it in a huge table. 7 00:00:22,960 --> 00:00:25,030 ‫If you update a rule, you just you go to that. 8 00:00:25,030 --> 00:00:25,270 ‫Right. 9 00:00:25,270 --> 00:00:27,630 ‫And just updated end of story. 10 00:00:27,970 --> 00:00:36,430 ‫But what happens if you update in a in a partition and that the act of updating that rule moves the 11 00:00:36,490 --> 00:00:41,690 ‫that that that role from this partition to another partition, let's say customer? 12 00:00:41,750 --> 00:00:44,590 ‫It is a bad idea, but let's say Grace, that's an example. 13 00:00:44,590 --> 00:00:46,120 ‫We get the grades. 14 00:00:46,120 --> 00:00:50,560 ‫I move the grade from partition, Waseca partition one. 15 00:00:50,560 --> 00:00:52,570 ‫And I did agree to 60. 16 00:00:52,790 --> 00:01:00,340 ‫Now you just move the entire row from one partition to another and that that is a slow the act of updating. 17 00:01:00,340 --> 00:01:06,200 ‫Now you're deleting and inserting into another table that could be very, very slow. 18 00:01:06,490 --> 00:01:09,340 ‫So so you do this so many times. 19 00:01:09,340 --> 00:01:13,630 ‫If you're moving on porchetta other, you can actually harm your SSD. 20 00:01:13,810 --> 00:01:14,530 ‫You can. 21 00:01:14,800 --> 00:01:15,450 ‫You can of course. 22 00:01:15,490 --> 00:01:20,800 ‫Especially you're jumping from one partition to another so that as the pages if you're doing this so 23 00:01:20,800 --> 00:01:23,680 ‫many times, man that could hurt Ram. 24 00:01:23,680 --> 00:01:24,850 ‫So avoid update. 25 00:01:24,850 --> 00:01:30,730 ‫That move arose from one partition to another partition that actually changes the definition of the 26 00:01:30,730 --> 00:01:30,970 ‫word. 27 00:01:30,970 --> 00:01:32,890 ‫Partition is inefficient. 28 00:01:32,890 --> 00:01:36,150 ‫Queries could accidentally scan or partition. 29 00:01:36,160 --> 00:01:44,020 ‫So yeah, if you queries actually include the workloads that then knows that, that lets the database 30 00:01:44,020 --> 00:01:45,370 ‫know which partition to head. 31 00:01:45,520 --> 00:01:46,440 ‫Everything is rosy. 32 00:01:46,810 --> 00:01:53,590 ‫However, if you if your query actually is inefficient, you will end up scanning all the partitions 33 00:01:53,590 --> 00:01:59,650 ‫and this might actually result in a slower performance than just having a single table. 34 00:02:00,130 --> 00:02:00,680 ‫Right. 35 00:02:00,970 --> 00:02:06,010 ‫So let's say you select star from this table where it is greater than one. 36 00:02:06,910 --> 00:02:09,340 ‫You just basically selected everything. 37 00:02:09,670 --> 00:02:15,280 ‫But instead of selecting one table, no selecting seven or five tables based on how many partitions. 38 00:02:15,460 --> 00:02:17,890 ‫So the database is jumping between one table and another. 39 00:02:18,160 --> 00:02:19,000 ‫So that could be slot. 40 00:02:19,780 --> 00:02:21,220 ‫So think about all that stuff, guys. 41 00:02:21,550 --> 00:02:23,110 ‫Schema changes are challenging. 42 00:02:23,110 --> 00:02:25,870 ‫Dilemmas usually manage that usually. 43 00:02:26,210 --> 00:02:26,520 ‫Right. 44 00:02:26,800 --> 00:02:33,310 ‫So, like, if you ordered an index on it on the master table or the or the partition table, all the 45 00:02:33,310 --> 00:02:38,280 ‫partition child tables will get that index. 46 00:02:38,290 --> 00:02:39,370 ‫We saw that. 47 00:02:39,610 --> 00:02:39,820 ‫Right. 48 00:02:39,820 --> 00:02:40,750 ‫And then the table. 49 00:02:40,930 --> 00:02:43,360 ‫However, sometimes this doesn't always work. 50 00:02:43,360 --> 00:02:45,780 ‫The tables actually has to support this feature. 51 00:02:45,940 --> 00:02:47,320 ‫So that's the interesting part of.