1 00:00:00,060 --> 00:00:03,610 ‫Horizontal partitioning or just partitioning versus SHARDEY? 2 00:00:03,900 --> 00:00:09,300 ‫So, guys, we made a video about sharding partitioning, but the story is very interesting and let's 3 00:00:09,300 --> 00:00:12,260 ‫discuss the difference between the two horizontal partition. 4 00:00:12,270 --> 00:00:18,120 ‫We just partition splits the big table into multiple tables in the same database. 5 00:00:18,540 --> 00:00:25,880 ‫And the database takes care of the management of these partition you as a client, as a query builder. 6 00:00:26,250 --> 00:00:28,500 ‫You have no idea what partition you're hitting. 7 00:00:28,680 --> 00:00:30,050 ‫The database is designing. 8 00:00:30,060 --> 00:00:32,610 ‫So that's why I said the client is agnostic. 9 00:00:32,790 --> 00:00:35,840 ‫It doesn't care which partition is going to hit the database. 10 00:00:36,030 --> 00:00:41,910 ‫I'm sending my own beautiful query and the database decides which partition to head based on the logic 11 00:00:41,910 --> 00:00:42,750 ‫on the where clause. 12 00:00:43,240 --> 00:00:44,310 ‫So that's the trickier. 13 00:00:44,940 --> 00:00:49,710 ‫Sharding, on the other hand, splits the big table into all the multiple tables. 14 00:00:49,800 --> 00:00:53,220 ‫However, they are completely different servers. 15 00:00:53,250 --> 00:00:54,960 ‫They are on a completely different database server. 16 00:00:55,080 --> 00:00:59,340 ‫And you do this for for distributed essentially processing. 17 00:00:59,340 --> 00:00:59,600 ‫Right. 18 00:00:59,740 --> 00:01:02,610 ‫So like, let's throw this into different tables. 19 00:01:02,610 --> 00:01:02,850 ‫Right. 20 00:01:02,850 --> 00:01:05,100 ‫All together in different servers altogether. 21 00:01:05,460 --> 00:01:13,110 ‫So that like basically for latency issues, like I say, California customers, we're going to put a 22 00:01:13,110 --> 00:01:16,980 ‫database, Shahd, just for California customers. 23 00:01:17,130 --> 00:01:23,520 ‫And you're going to hit if you're from California, we're going to hit you based on on a like a proxy 24 00:01:23,530 --> 00:01:24,150 ‫school. 25 00:01:24,300 --> 00:01:30,360 ‫We're going to detect where IP addresses are from and we're going to serve you to the database or if 26 00:01:30,360 --> 00:01:37,590 ‫it's read, for example, to the database instance that has the California table. 27 00:01:38,340 --> 00:01:38,730 ‫Right. 28 00:01:38,730 --> 00:01:45,140 ‫Versus if you're going from Asia, we're going to hit you with an Asian server. 29 00:01:45,270 --> 00:01:45,600 ‫Right. 30 00:01:45,610 --> 00:01:49,150 ‫So that's the Hidatsa IP address is different, completely different IP address. 31 00:01:49,350 --> 00:01:51,270 ‫So that's a beautiful, beautiful design. 32 00:01:51,450 --> 00:01:54,060 ‫Obviously, it's a little bit complicated, but but yeah. 33 00:01:54,240 --> 00:01:58,650 ‫So if you think about it, the client is aware of the of the Shard. 34 00:01:58,770 --> 00:01:59,160 ‫Right. 35 00:01:59,340 --> 00:02:02,080 ‫Which is Bignone on and sharding. 36 00:02:02,100 --> 00:02:04,620 ‫That's that's one of the big thing that I don't like about Chani. 37 00:02:05,130 --> 00:02:09,360 ‫And I know Vitesse and other technologies are trying to solve this. 38 00:02:09,360 --> 00:02:15,570 ‫But still it's a it's a it's a big it's a big investment for anyone back engineers. 39 00:02:16,800 --> 00:02:22,320 ‫So the table names, this is like a little bit of just detail the horizontal partitioning table name 40 00:02:22,320 --> 00:02:23,850 ‫changes of that back end. 41 00:02:24,030 --> 00:02:26,670 ‫You have like multiple table names and they are changed. 42 00:02:26,970 --> 00:02:27,330 ‫Right. 43 00:02:27,490 --> 00:02:31,650 ‫However, in the Sharding case, the timetabling stays the same almost. 44 00:02:31,650 --> 00:02:31,890 ‫Right. 45 00:02:31,890 --> 00:02:36,300 ‫Because the query is exactly identical. 46 00:02:36,300 --> 00:02:37,140 ‫Doesn't change. 47 00:02:37,410 --> 00:02:37,770 ‫Right. 48 00:02:38,040 --> 00:02:43,410 ‫But the server way to which you're executing the query against actually changes.