How do queries work in Cloud Firestore? | Get to know Cloud Firestore #2

  Рет қаралды 390,872

Firebase

Firebase

Күн бұрын

How do queries work in Cloud Firestore? What kinds of queries can you run, and what kind can't you run? And what are composite indexes, anyway? Find out the answers to all of these questions and more on this episode of Get to Know Cloud Firestore. Subscribe to the Firebase channel for more content like this and let us know what you think in the comments below!
Watch Get to know Cloud Firestore #1 → bit.ly/2ssnX7i
More episodes on Cloud Firestore → goo.gle/Cloud-Firestore
Subscribe to Firebase → goo.gle/Firebase

Пікірлер: 213
@MartinRyleOShea
@MartinRyleOShea 6 жыл бұрын
The best tech evangelist of any tech company. This guy really knows his craft.
@vaguebrownfox
@vaguebrownfox 3 жыл бұрын
He really helps me calm down my anxiety to start a project.
@Moelgaard85
@Moelgaard85 6 жыл бұрын
Best firestore video so far. Really calls a spade for a spade, talks about what you can do, what will be developed and what you can’t do. And many examples. Perfect. I am so tired of videos where everything is just perfect and avoiding the elephant in the room.
@srolesen
@srolesen 6 жыл бұрын
YES, this so much!!! so many realtime chat app guides pretending to have ANY useful features for real data usage.
@GrumpyOldMan9
@GrumpyOldMan9 Жыл бұрын
He didn't explain how to enable a single composite index for multiple collections.
@Mrdoctordiv
@Mrdoctordiv 4 жыл бұрын
Watching this in 2020 with the 2019 update added in.. this. This is quality content. I chose the right platform for my web app.
@lesmo34
@lesmo34 4 жыл бұрын
ikr! I'm seriously troubled by the fact that it says it was published May 2018... you can either edit KZbin videos with some sorcery I don't know, or they have a perfectly nice roadmap way ahead in time... I don't know.
@HieuNguyen-vk7ix
@HieuNguyen-vk7ix 4 жыл бұрын
@@lesmo34 I mean, FireStore belongs to Google, KZbin belongs to Google too. You know what I mean
@MatthewChenIsAwesome
@MatthewChenIsAwesome 4 жыл бұрын
@@HieuNguyen-vk7ix yeah. as of now, IIRC only Google can edit their own videos
@rajpanchal9226
@rajpanchal9226 3 жыл бұрын
@@HieuNguyen-vk7ix They should not do this tho its really dangerous, if suppose there's a really old video and someone describes newly found innovations in it the people who are the inventors of those innovations will have a hard time getting patents for those innovations. In fact if the tech in this video is patented by them in 2019 they might as well get into trouble.
@lesmo34
@lesmo34 3 жыл бұрын
@Casuality videos edited in Creator Studio don't keep their original creation date ;)
@prashantraghu8536
@prashantraghu8536 6 жыл бұрын
Guys please make more such algorithmic videos explaining all the features in somewhat low level. This was simply amazing.
@crazysoap05
@crazysoap05 5 жыл бұрын
I don't think they are going to give their secrets away haha
@OvenBakedCookie
@OvenBakedCookie 4 жыл бұрын
Todd is bloody amazing. The pacing, examples, emphasis, humour, enthusiasm, level of technical detail; he is the perfect software trainer.
@DavidUngerMusic
@DavidUngerMusic 6 жыл бұрын
I love how Todd makes seemingly complex ideas easy to understand. Bravo!
@jhadesdev9576
@jhadesdev9576 6 жыл бұрын
Awesome video, probably the best i have seen on the topic, focuses on the Why and not the How, which is usually what gets overlooked in tutorials
@quangquang4813
@quangquang4813 6 жыл бұрын
I have been waiting too long for this episode. :(( This is a great video anyway
@mgohds
@mgohds 5 жыл бұрын
This is great series. You are doing great job explaining basic behavior and are charismatic in the process which is rare in this kinda videos. Playlists also sure help a lot. Keep up the good work :)
@albertodeveloper347
@albertodeveloper347 5 жыл бұрын
This teacher is VERY friendly!! thank you!! and now I go for vide #3 :)
@chriscurnow143
@chriscurnow143 6 жыл бұрын
Seeing this video pop up on my alerts made my day. And actually watching it was just as much fun and just as informative as I expected it to be. So.... when's the next one coming??
@zechcampbell
@zechcampbell 5 жыл бұрын
Amazing explanations about what Firestore can and cannot do. Wish there were more resources like this.
@JanM457
@JanM457 11 ай бұрын
I'm smashed by the fact that Ray's Restaurant scored over 4.5 stars just selling Radishes. What a guy!
@mandisaw
@mandisaw 6 жыл бұрын
Brief, but insightful, and a good bridge for the folks coming from a relational DB background. Structuring data to suit Firestore's query capabilities is the key takeaway here - that should be mentioned in the description. It's easy to miss it thinking "ah, I know how to query" - I know I nearly did.
@nldr_theunisdk
@nldr_theunisdk 6 жыл бұрын
The was super informative!! thanks! I am glad that there are more vids about the advanced features. You tend to miss them in the docs.
@DRocksRecords
@DRocksRecords 3 жыл бұрын
Thanks, im starting to feel more confident about firestore as I watch.
@nikhilenmudi2490
@nikhilenmudi2490 5 жыл бұрын
Love you analogies and explanation style!
@abc-yg6tk
@abc-yg6tk 6 жыл бұрын
Excellent video. Entertaining, good pacing, explains the algorithms and the why and how. Learnt a lot in 15mins
@PrashanthHN
@PrashanthHN 6 жыл бұрын
Nice! had been wondering about query efficiencies since a week and this explains it well!
@BissoliR
@BissoliR 5 жыл бұрын
You guys should do a serie about Elasticsearch integration cause it seems a little frustrating not having this option til now. We need 'like' queries indeed.
@brunodigiorgio1127
@brunodigiorgio1127 Жыл бұрын
Un capo Robin Williams
@yashsoni1120
@yashsoni1120 2 жыл бұрын
he is so good at this and everything kind of makes sense now! thanks for the series!!
@KnO1951
@KnO1951 4 жыл бұрын
Great presentation of the occasionally head-spinning content that you have made easy to consume. kudos!!
@KamelJabber1
@KamelJabber1 4 жыл бұрын
LOVE THE UPDATE! thanks so much for that
@scottieschneider1925
@scottieschneider1925 4 жыл бұрын
Thank you so much for this! Really great information.
@eliteeth4n
@eliteeth4n 6 жыл бұрын
More "Into the weeds" videos!
@pasta0328
@pasta0328 6 жыл бұрын
You are an excellent teacher
@Qoor1994
@Qoor1994 Ай бұрын
Todd, you are amazing. Thank you for sharing your technical knowledge!
@DiegoJaraPalomino
@DiegoJaraPalomino 6 жыл бұрын
This is great! Can't wait for the pagination video
@kaibe5241
@kaibe5241 Жыл бұрын
hahaha, the time warps back to update the content is absolutely SUPERB! Bravo!!! *applauds*
@munzilirrohmah6425
@munzilirrohmah6425 2 жыл бұрын
Hi Todd. This is the most enjoyable tutorial video I've ever seen 😂 Easy to understand and hilarious at the same time
@BaRzOmk
@BaRzOmk 6 жыл бұрын
Please more videos and Please explain more slower, feels like we are running from firestorm :)) And love all firebase videos... Thanks again...
@MrRantelo
@MrRantelo 6 жыл бұрын
We can no longer watch in 2x speed :(
@IljaDidDevs2
@IljaDidDevs2 6 жыл бұрын
Would be awesome to have similar video done for security rules :)
@marriagebureaufreematrimon5751
@marriagebureaufreematrimon5751 5 жыл бұрын
really good information thank you
@rammalvarez2664
@rammalvarez2664 6 жыл бұрын
Very nice video! Thank you guys!
@noamgonen6243
@noamgonen6243 6 жыл бұрын
love your technical jargon. Googling Giant Pain in the .... right now
@27sosite73
@27sosite73 2 жыл бұрын
awesome one more perfectly structured video! top!!!
@luundalite7962
@luundalite7962 3 жыл бұрын
Watching in 2021 but no future guy from 2020 though. Great content. Amazingly intuitive.
@OfferoC
@OfferoC 6 жыл бұрын
Awesome. Please continue to go in depth on fire store.
@vinfragwarrior
@vinfragwarrior 3 жыл бұрын
"the time it takes to run a query is proportional to the number of results, NOT the number of documents you're searching through" MY LIFE IS A LIE. This goes against everything I thought I knew hahaha
@MrAlexMN
@MrAlexMN 6 жыл бұрын
Well done video, Thank you.
@rawtale97
@rawtale97 Жыл бұрын
Had to go through variouse tutorials before understanding how I should make a propper query for Firebase, I think there might be a lack of examples in the docs and also in this video.
@Joyceview
@Joyceview 6 жыл бұрын
😂 Love it! Both the tech and the show!!!
@josefsantamaria
@josefsantamaria 6 жыл бұрын
In your older videos you made an example of how to structure events with attendees etc it would be very helpful if you could make one of those with Firestore!
@RossRawlins
@RossRawlins 6 жыл бұрын
Great video.
@andyfusniak
@andyfusniak 6 жыл бұрын
Great video. As querying a collection automatically generates an index, this raises a whole bunch of questions... How can we see what indexes are in use? Does a one-off query cause an index to be built and maintained for the lifetime of a collection? What is the storage cost penalty for each index? Can we remove an index? Does having more indexes slow down document write speed, or are indexes eventually consistent?
@Frank_van_Puffelen
@Frank_van_Puffelen 6 жыл бұрын
Wow, lots of great questions. I'll try to answer what I can quickly: 1) there is no way to see what indexes are used. But while it would be interesting to see the query plan, you can't affect it. No matter how you write the query, the indexes used will be the same. 2) If you don't need a composite index anymore, you can delete it from the console. 3) there is no charge for index storage. 4) yes, you can remove any composite index from the console 5) I haven't gathered any such performance metrics for this yet. I you get to them, I'd love to see the results.
@davisyeung937
@davisyeung937 4 жыл бұрын
Awesome video! It will be great if there is a detailed video explaining the suggested way of doing "full text searching" in firestore.
@choibaksa85
@choibaksa85 5 жыл бұрын
subtitle broken!
@zensic
@zensic 2 жыл бұрын
Thank you! Very helpful!
@AlexPaluzzi
@AlexPaluzzi 6 жыл бұрын
Please more videos like this. More code too. Would love to see some stuff from scratch.
@1002CK
@1002CK 5 жыл бұрын
Actually last three minute help a lottt
@cyrilledakhlia3761
@cyrilledakhlia3761 Жыл бұрын
Excellent content that makes it so fun to learn and makes me want to learn more about it! One of the best content I've seen! 👏👏
@romualdbarbe1070
@romualdbarbe1070 6 жыл бұрын
Thanks a lot I'm waiting for the episode about searching in text :) Apparently we can do it with algolia, is there a way to perform a search with synonims ?
@simbarashemaunga5575
@simbarashemaunga5575 5 жыл бұрын
Great vid thanks
@tomascarignano5002
@tomascarignano5002 2 жыл бұрын
Superb documentation Firebase team!
@TheGrafox
@TheGrafox 6 жыл бұрын
Will done ... Very nice
@greenhelix
@greenhelix 3 жыл бұрын
so exciting thanks
@101nka
@101nka 5 жыл бұрын
These videos are so entertaining
@musicandoutdoors
@musicandoutdoors 5 жыл бұрын
Agreed with the comments, this video taught me to fish instead of giving me a fish. I understand much better now
@townheadbluesboy
@townheadbluesboy 6 жыл бұрын
keep them coming
@cutiko
@cutiko 6 жыл бұрын
The indexing link works like a charm.. except while using multiple accounts. Yes, it is an edge case and would dismiss it normally but I start to get tangled with this because in my new gig they made a mail account for me, which I have to use for the project. So when copy/paste the link, it doesn't work because is by default grab my main account. I'm doing a work around on this by pasting the link on an incognito tab or opening it in another browser.
@Balaji-qx3ul
@Balaji-qx3ul 4 жыл бұрын
Best with play speed of .75 :) excellent tutorial.
@Elyx0
@Elyx0 4 жыл бұрын
Subtitles are messed up from the 2019 update!
@osmanmusse9432
@osmanmusse9432 2 жыл бұрын
great mentor
@bazoozoo1186
@bazoozoo1186 4 жыл бұрын
this guy is hidden gem
@TheTiagoslater
@TheTiagoslater 3 жыл бұрын
excellent video
@ME-oe9gq
@ME-oe9gq 3 жыл бұрын
watching this in quarantine
@connorflewitt8377
@connorflewitt8377 2 жыл бұрын
Todd is such a great presenter!
@codewithtae6637
@codewithtae6637 Жыл бұрын
According to the docs, you can do "OR" queries. At the time of this writing, the "OR" query is in "preview".
@thedevguild7525
@thedevguild7525 2 жыл бұрын
Wow did they update the video? I understand it is posted in 2018 but in 2:11, todd mentioned/"joke" it is the year 2019
@MrRousina
@MrRousina Жыл бұрын
Lol I am just wondering the same, like was that in the original video or is it updated somehow xd
@davidpui4675
@davidpui4675 Жыл бұрын
How do you create a denormalized query output which can be populated from different nest collections ? Also can you also join results from different nested collections from different Firestore Projects ?
@NicoloZanetti
@NicoloZanetti 5 жыл бұрын
I can't say that I fully understood the difference between an equality and inequality search, I got an idea, but I wouldn't be sure about what I would code. If I start from the Restaurant in S. Francisco (iii), and then I Zig to the Japanese one with the same id (iii), and then the next Japanese one (ttt) which sends me back to the ones in S. Francisco (ttt), how can I be sure that I haven't skipped some in the S. Francisco list between iii and ttt? This would assume that the Japanese restaurants are also sorted by City, but with other fields and possibly changes happening is this really always true and reliable? Did I just describe that it could be an "inequality" search where there's no certain relationship between the order of the two fields?
@PlayerHeader
@PlayerHeader 5 жыл бұрын
same question here
@littleElmimo123
@littleElmimo123 4 жыл бұрын
I wish I’d watched this first
@jasonsebring3983
@jasonsebring3983 6 жыл бұрын
i keep wondering when this will have full text search and geo search otherwise you can scale with mongo and elastic and they work better but ive found also needings joins with mysql so you need many dbs for the task at hand and this aint it yet
@nickadams2361
@nickadams2361 2 жыл бұрын
wow this guy rocks
@raghav4296
@raghav4296 5 жыл бұрын
Wow, Indeed a great video!! Since there is no full text search supported as mentioned 6:30 isn't it a common use case for most apps, as in this case, the user may not type the restaurant name correctly all the time.Any simpler way of doing this other than hooking up a elastic search/Algolia?
@UsmanAli-ox3mn
@UsmanAli-ox3mn 2 жыл бұрын
Overloaded.... I have to watch this multiple times.... still good video
@PlayerHeader
@PlayerHeader 4 жыл бұрын
i love todd he's the best
@PlayerHeader
@PlayerHeader 5 жыл бұрын
Ahh now I understand it 10:45. If we have this indexes for zip code, which is a string, then firebase puts in to the index table all zip codes side by side (groups them) and orders them by their doc_id, so that aaa is the first and xxx the last. But if we have some stuff like the avg_rating, and do > or
@Nevalkar_
@Nevalkar_ 4 жыл бұрын
Please google, raise the salary of this guy. He makes me laugh in every video and his knowledge is very deep. Congrats!
@joaocoelho2929
@joaocoelho2929 3 жыл бұрын
Raul Heredia don’t worry, he makes enough
@rubencg195
@rubencg195 5 жыл бұрын
When are the OR, IN, CONTAINS and other similar conditions going to be available? It really limits the usability of the platform.
@paulmacfarlane6089
@paulmacfarlane6089 4 жыл бұрын
A little bit late on this, but an "or" condition can now be accomplished using the "in" query operator, and specifying the potential alternatives in an array (although right now they limit it to 10 possibilities). From the docs: citiesRef.where('country', 'in', ['USA', 'Japan']); you can also use array-contains-any citiesRef.where('regions', 'array-contains-any', ['west_coast', 'east_coast']);
@PlayerHeader
@PlayerHeader 5 жыл бұрын
9:30 - I don't understand why this ain't working but the example with San Franciso and Japanese is working at 8:40
@tranquillityEnthusiast
@tranquillityEnthusiast 5 жыл бұрын
How can we order the document by time
@activewire-play7109
@activewire-play7109 5 жыл бұрын
Just a question, the composite index is a string and we are checking for a number comparison. is that a right example?
@tobiabocchi9102
@tobiabocchi9102 2 жыл бұрын
Thank you Edward Alderson, aka mr Robot
@rasulbc
@rasulbc 2 жыл бұрын
thanks for telegram notification sound on 0:16
@wadexyz
@wadexyz 3 жыл бұрын
nice plants
@locusm
@locusm 4 жыл бұрын
This series could be updated and have its own playlist
@locusm
@locusm 4 жыл бұрын
Ah - some dude dropped in with an update :)
@azka9075
@azka9075 3 жыл бұрын
what do you mean when you said we are limited to 200 of these things during the collection group query limitations part, do you mean we can only create 200 collection groups at most?
@jazelleanncapuli8346
@jazelleanncapuli8346 5 жыл бұрын
how can you query timestamp? or date? any help appreciated.
@aungkhant502
@aungkhant502 3 жыл бұрын
Update: != query on a single field is now supported since Sept 2020.
@yeeen123
@yeeen123 6 жыл бұрын
Is the collection grp query feature alr in?
@afghanapp3242
@afghanapp3242 3 жыл бұрын
Now I know how important Data structures and Algorithms have been.
@BissoliR
@BissoliR 5 жыл бұрын
When you come from an Oracle PL/SQL background and find your self trying to do some advanced queries and sometimes even simple ones you will be very frustrated.. hahaha
@thedevguild7525
@thedevguild7525 2 жыл бұрын
Hi Todd, may i ask how is the index/ document id created/name? 5:44 Please correct me if i am wrong, I believe that how indexing work is create individual tables for each field name e.g. address - 1 table and crusine - 1 table. 9:48 Within each table is the value and its location
@albertarthur5745
@albertarthur5745 5 жыл бұрын
assited me to work on research
@johnbalvin5401
@johnbalvin5401 6 жыл бұрын
11:26 great avance as it's ancestor datastore cloud.google.com/datastore/docs/concepts/queries#datastore-datastore-basic-query-go that would requires and index.yaml that was a little pain in the butt
@sasimarian142
@sasimarian142 5 жыл бұрын
Is there any number of composite indexes limitation?
@imatricepte94
@imatricepte94 4 жыл бұрын
damn that video is so good it anwsers all my questions ! how come the complexity of a nosql database does not depends on the number of elements we are searching through ?
@imatricepte94
@imatricepte94 4 жыл бұрын
well my question has been answered immediately in the video lmao
@joshuaoba2526
@joshuaoba2526 4 жыл бұрын
At 2:50 , when you say “ 200 of this things “ do you mean 200 Collection group queries or 200 Documents to search through per Collection group query or 200 results per Collection group query
Cloud Firestore Pricing | Get to know Cloud Firestore #3
16:23
How do NoSQL databases work? Simply Explained!
7:38
Simply Explained
Рет қаралды 1,1 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 35 МЛН
ТАМАЕВ УНИЧТОЖИЛ CLS ВЕНГАЛБИ! Конфликт с Ахмедом?!
25:37
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 35 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 10 МЛН
100 Firebase Tips, Tricks, and Screw-ups
24:31
Fireship
Рет қаралды 185 М.
How do Cloud Functions work? | Get to know Cloud Firestore #11
18:21
Cloud Firestore Data Modeling (Google I/O'19)
40:37
Firebase
Рет қаралды 171 М.
But What Is Cloud Native Really All About?
7:32
ByteByteGo
Рет қаралды 141 М.
I tried 5 Firebase alternatives
10:31
Fireship
Рет қаралды 766 М.
Security Rules! 🔑 | Get to know Cloud Firestore #6
22:39
Firebase
Рет қаралды 268 М.
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 5 МЛН
😱Хакер взломал зашифрованный ноутбук.
0:54
Последний Оплот Безопасности
Рет қаралды 578 М.
Clicks чехол-клавиатура для iPhone ⌨️
0:59