Materialized View in SQL | Faster SQL Queries using Materialized Views

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2025

ความคิดเห็น • 220

  • @asutoshkumar1793
    @asutoshkumar1793 ปีที่แล้ว +7

    Great Explanation, also Pronunciation for View is "vu" 😊

    • @techTFQ
      @techTFQ  ปีที่แล้ว +1

      Thanks & noted

  • @jimzecca3961
    @jimzecca3961 2 ปีที่แล้ว +27

    Good summary. Two important items.
    1) The materialized view is essentially a normal table under the hood with query logic for populating it thus you can index it, etc.
    2) The data is basically static until you refresh it at which time it's flushed and the data is replaced by the result of the query at the new run time.
    They're particularly good when the performance to run the query is poor but the data doesn't have to be exact or up to the last second. For example, if you wanted to run a query that generates a report for the previous day you could create the materialized view to get the data from yesterday and run it on a schedule after midnight. Then the user can query the materialized view with a select * in the morning and get quick results without waiting on the query to execute against the base data. Sometimes it makes sense to have the materialized view to contain most of the result set and then some optimized query to just pull data from the current day, hour, etc. and union the results together.

    • @DaveThomson
      @DaveThomson ปีที่แล้ว +1

      you can also refresh the MV using a function and run that function from a trigger based on some conditions.

    • @MacPG-rc8ti
      @MacPG-rc8ti 3 หลายเดือนก่อน

      @@DaveThomson Thanks for this hint. Do you mind sharing a practical scenario about this?

  • @naguleshwarg2320
    @naguleshwarg2320 2 ปีที่แล้ว +45

    Hello TFQ.. Really loved the way you teach SQL concepts. It would be great if you could make videos on Trigger, Cursor, Function, Index, Record, Exception Handling, Package and Partitions. It would be of immense help for every aspiring data scientists.

  • @falconmack
    @falconmack 11 หลายเดือนก่อน

    Extremely helpful video, I didn't know nothing about views, and now I feel like an expert. THANK YOU SO MUCH

  • @clumsy_weirdo
    @clumsy_weirdo ปีที่แล้ว +1

    It the the best tutorial for understanding. I'm really glad that I can recognize English speech because in my native language I didn't find any information about. Author, thank you!

  • @srinivaskattunga7778
    @srinivaskattunga7778 2 ปีที่แล้ว +1

    The BEST Training for SQL learners, the teaching concepts are "JUST AMAZING"

  • @kpoddarmeasme
    @kpoddarmeasme 2 ปีที่แล้ว +4

    I like the way you explain each and every concept in detail.If I don't understand any concept in SQL, I immediately switch to your channel and it really helps.

  • @smrutimohanty8560
    @smrutimohanty8560 10 หลายเดือนก่อน

    very nice. Even though I am a PM and do not work technically on SQL , I could understand the concepts. Keep up the good work

  • @engalibadouin5222
    @engalibadouin5222 3 หลายเดือนก่อน

    Really the best tutor i see in database

  • @sudarshanmhaisdhune1039
    @sudarshanmhaisdhune1039 ปีที่แล้ว

    Short, simple & easy to understand. Thanks Taufiq!

  • @aap1803
    @aap1803 2 ปีที่แล้ว +6

    Hello Toufiq, I hope you are doing good. I'm learning PL/SQL for almost last 6 months now but i have struggled to hold grasp on PLSQL concepts but after watching your videos and how clearly you explain i was able to understand very good. Like your video on Materialized View i knew how it work but after watching your video i understood the concept fully. I would really thank you for your work. Same goes with Procedure, Joins. I have a request if you could make PLSQL videos on Trigger, Cursor,Function,Index,Record,Exception Handling,Package and other if you could. Thanks for the awesome work you are doing.

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      Hi Achal, I am fine and thank you 🙏🏼
      Noted on the request, I’ll plan it

    • @nirmala3847
      @nirmala3847 2 ปีที่แล้ว +2

      @@techTFQ my request also same sir please make videos for all the important components your explanation is very good iam from telugu I don't know English very well but i understand your English it is very simple and understandable

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Thank you Nirmala 🙏🏼
      I will plan it

  • @suviikshetty2969
    @suviikshetty2969 2 ปีที่แล้ว +3

    Hi tfq, worth watching . It was great and clear. Thanks for the video.

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +2

      Glad this helped

  • @amartyakumarsaha338
    @amartyakumarsaha338 2 ปีที่แล้ว +1

    The way you have explained it is amazing and thanks for this incredible content.

  • @MDNASIR-d8c
    @MDNASIR-d8c 6 หลายเดือนก่อน

    Best Explanation........

  • @fathimafarahna2633
    @fathimafarahna2633 2 ปีที่แล้ว +3

    👌🏻👌🏻👌🏻👌🏻👌🏻on point

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Thank you 🙏🏼

  • @EverydayKarma
    @EverydayKarma 4 หลายเดือนก่อน +1

    Nicely explained. Thanks

  • @kevinlovely2098
    @kevinlovely2098 9 หลายเดือนก่อน

    You made this very simple to understand. Thanks!

  • @prabhakarraokaranam719
    @prabhakarraokaranam719 2 ปีที่แล้ว +1

    awesome Tafaq .. thanks alot .. please continue sessions on Materialized views .. with all refresh methods .. it is very nice of you. Thanks once again

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +2

      Thank you and noted bro

  • @umidkurbanov5495
    @umidkurbanov5495 ปีที่แล้ว

    Bro, you're awesome. Very clearly explained

  • @hammadyasir2174
    @hammadyasir2174 7 หลายเดือนก่อน

    Excellent Sir.I really appreciate your effort

  • @karennguyen7083
    @karennguyen7083 2 ปีที่แล้ว +6

    Hi techTFQ, thanks for uploading amazing video, I learned a lot from you. And now I have a question.
    I am confused about these syntax:
    - create view
    - create materialized view
    - create temporary table
    - with clause
    These syntax can store a subset data to reuse then, but when to use it?
    I knew we can use With clause when using specific subqueries many times but how are other syntax?
    Thank you so much.

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +4

      Hi Pham,
      I understand your confusion but difficult to explain it in comment here.. perhaps will do in a video

    • @karennguyen7083
      @karennguyen7083 2 ปีที่แล้ว +3

      @@techTFQ Happy to wait and thank you so much ^^

  • @shanmukhpriya
    @shanmukhpriya 6 หลายเดือนก่อน

    You are really champ sir

  • @harshusaaho7623
    @harshusaaho7623 2 ปีที่แล้ว +1

    I took your course broah ...I hope I get a lot of insights !!!

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      Great, see you in the class

  • @CodeChaos_
    @CodeChaos_ 11 หลายเดือนก่อน +2

    yes need materialized view in oracle

  • @artrixmotion5885
    @artrixmotion5885 2 ปีที่แล้ว

    Very Helpful, Kindly make separate video for MS SQL materialized View sir. Thanks ahead & more power

  • @mohammedshahil4898
    @mohammedshahil4898 2 ปีที่แล้ว +2

    Awesome👌 Very well explained🙌🏻

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      Thank you bro

  • @jvkk123
    @jvkk123 2 ปีที่แล้ว

    Thanks for sharing your knowledge, It's great that you provide training, i would like to get started

  • @arunsundar3739
    @arunsundar3739 4 หลายเดือนก่อน

    beautiful explained, fundamentals of MV & how it can be really powerful in analytics use cases :)

  • @govindkeot8668
    @govindkeot8668 2 ปีที่แล้ว

    Explained Very well,Thanks

  • @skdonsingh
    @skdonsingh ปีที่แล้ว

    Just Wow.. Thank you.

  • @Blowjin
    @Blowjin ปีที่แล้ว +1

    Thank you! So, as I understood, matetrialized view is a kind of cache.
    It store query and it's result. Menwhile a just view stores query only.
    Nevermind, just my synopsis 😅

  • @Englishwavesodia123-c4i
    @Englishwavesodia123-c4i 6 หลายเดือนก่อน

    Good explanation 😊

  • @Dental798
    @Dental798 2 ปีที่แล้ว +3

    Learnt from you previous video instead of generate_series() function we can use Recursive .
    CREATE TABLE random_for_matvw (
    id INT PRIMARY KEY,
    value INT
    );
    WITH RECURSIVE rand(id, value) as (
    SELECT 1 as id, 1 as value
    UNION ALL
    SELECT id + 1, value + 1 from rand where id < 100000
    )
    INSERT INTO random_for_matvw(id,value) SELECT id, value FROM rand;

  • @gangajairaman8742
    @gangajairaman8742 2 ปีที่แล้ว +6

    Hi Tfq, your explanation about the concept is very good. Could you please upload the separate video for Oracle materialized view and view? Thanks

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Thank you and noted bro

  • @sridhargoud8457
    @sridhargoud8457 2 ปีที่แล้ว +1

    Trigger, Cursor,Function,Index,Record,Exception Handling,Package Please do these videos as soon as possible

  • @Refreshment01
    @Refreshment01 2 ปีที่แล้ว

    REQUEST: Please make advanced video odf postgres Regular Expressions.
    Your videos & blog are among the best on DBMS topics. 👍

  • @omkarmore2198
    @omkarmore2198 2 ปีที่แล้ว +1

    great explaination ....

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Thanks Omkar 🙏🏼

  • @sravanikolluru8129
    @sravanikolluru8129 ปีที่แล้ว

    Super explanation

  • @sayalishiledar8377
    @sayalishiledar8377 2 ปีที่แล้ว

    Very well explained 👍

  • @pauladams7850
    @pauladams7850 7 หลายเดือนก่อน

    Vera level bro

    • @no-one2177
      @no-one2177 7 หลายเดือนก่อน

      bro did he cover all the concepts in this course??

  • @basil6909
    @basil6909 ปีที่แล้ว +2

    In my work area we refresh the materialized view twice a day. One in the morning and one in the evening.

  • @mohammedbadah5537
    @mohammedbadah5537 2 ปีที่แล้ว +1

    Very clear video ... Please show us materialized view in Oracle
    Thank you so much Toufig

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Your welcome buddy and sure will do

  • @sudarshanreddy943
    @sudarshanreddy943 2 ปีที่แล้ว

    Really awesome 😎😎

  • @SM-km4gs
    @SM-km4gs 2 ปีที่แล้ว +1

    Thanks for the explanation...please make video on oracle as well.

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      your welcome and sure will do

  • @rajkumartripathi2855
    @rajkumartripathi2855 11 หลายเดือนก่อน

    Yes i appreciate it😊

  • @bindiyarastogi8793
    @bindiyarastogi8793 2 ปีที่แล้ว +2

    Your videos are really helpful and clear the concepts. Please make a series on pl/sql

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +3

      Noted Bindiya

  • @STTPwithRajani
    @STTPwithRajani 2 ปีที่แล้ว +1

    Thanks a lot🙏 u are doing unique work... please add more information integration and application videos in ur playlist...it will be great help...I am phd cse in IIIT Delhi...ur videos are helping 🙂add data warehousing view, virtual view etc if u will add more IIA videos I will suggest this channel to no of my classmates🙏

  • @deepakshrikanttamhane285
    @deepakshrikanttamhane285 2 ปีที่แล้ว +1

    great

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Thank you 🙏🏼

  • @akashgoel601
    @akashgoel601 2 ปีที่แล้ว +3

    Great video.. Pls consider making video for materialised view in oracle and it's different functionality.. Cheers!!

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +2

      Thank you and noted bro

    • @milindjogdand8630
      @milindjogdand8630 2 ปีที่แล้ว

      @@techTFQ Thanks Sir. Please make video for materialized view in Oracle.

  • @flowerpower6345
    @flowerpower6345 2 ปีที่แล้ว +1

    all your videos are very simple and helpful. Thank you. Can you please create a video on oracle performance tuning tips and also on how to partition oracle tables to improve sql performance

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      thank you and noted on the request bro

  • @archanachaube7027
    @archanachaube7027 2 ปีที่แล้ว +3

    Thanks for explaining concepts so clearly and simplifying complexed ones!
    Also can you make videos on Group by extensions (rollup, grouping sets.cube)

  • @illiasukonnik9966
    @illiasukonnik9966 11 หลายเดือนก่อน

    Thanks, greate video!! So materialized view is a form of denormalization, when we store precalculated data.
    viv ))

  • @sangameshwarhippargi2007
    @sangameshwarhippargi2007 2 ปีที่แล้ว +2

    Thanks for this wonderful video. Please do create video on Oracle materialized view and it's refresh types.
    Thanks in advance.

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      Noted and will do

  • @pavanmunagasetty6930
    @pavanmunagasetty6930 ปีที่แล้ว

    This video is nice

  • @thefireclipse
    @thefireclipse 2 ปีที่แล้ว +1

    This was a great video to watch, thank you! Please do make a video on how Oracle materialized views have more functionalities than Postgres :)

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Your welcome and sure wil do

  • @kanishkark4226
    @kanishkark4226 9 หลายเดือนก่อน

    Any video for indexes?

  • @kancharalaparameshwarreddy3837
    @kancharalaparameshwarreddy3837 2 ปีที่แล้ว +1

    sir your class videos are awesome ,i used to watch often sir if possible plz provide one or two classes on TRIGGERS AND JOB creation in postgresql

  • @rameshthanikonda7027
    @rameshthanikonda7027 ปีที่แล้ว

    Hi Toufiq,
    Firstly thanks for the video.
    Kindly explain the concept of materialized view in Oracle Database as well. Thank you once again..

  • @oscararmandocisnerosruvalc8503
    @oscararmandocisnerosruvalc8503 2 ปีที่แล้ว +2

    Hello TFQ , Thanks a lot for all the knowledge you share.
    can you create a list using SQL for data engineering purposes pls, it would be great to see how you address this topic.
    Regards from Mexico !!!

  • @nalinisathyanarayanan8666
    @nalinisathyanarayanan8666 2 ปีที่แล้ว +3

    Hi sir, Great work 👍 Really it's very helpful for learners like me... Expecting video by explaining Oracle materialized view concepts and refreshing methods too

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      Thank you Nalini and will do that soon

    • @jirehla-ab1671
      @jirehla-ab1671 ปีที่แล้ว

      Hi , i remember oraclr offering free entperse edition of oracle 21c (non-commercial use only), but i cant find the same equivalent for 23c since the 23c develop edition haa 12gb ram limit.

  • @ShiviSrivastava-p9n
    @ShiviSrivastava-p9n ปีที่แล้ว

    This was very well explained and it was easy to understand. Please make a seperate video for Oracle as well. It would be great help.

  • @anupamyadav5257
    @anupamyadav5257 2 ปีที่แล้ว +1

    Thanks for making video.....
    Please make video for Oracle on both the views in detail

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Noted bro

  • @endalekinfe3391
    @endalekinfe3391 8 หลายเดือนก่อน

    Some database systems, like SQL Server with indexed views, maintain the materialized view in real-time. Any changes to the base tables are immediately reflected in the materialized view. This means the view is always up-to-date,

  • @venukumargadiparthy8233
    @venukumargadiparthy8233 2 ปีที่แล้ว +1

    Hello , your videos are really helpful, please do a video on MS SQL materialized views

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      Noted bro

  • @MST_Finvest
    @MST_Finvest 2 ปีที่แล้ว +3

    Hello Brother,
    Awesome explanation with clarity.Please do video for mviews on oracle DB with many types of refreshes as you said and also can we have a view or mview on DML's instead of sql queries?

  • @pratikhonrao733
    @pratikhonrao733 11 หลายเดือนก่อน

    Hello TFQ - what's the difference between Materialized Views and TEMP tables?

  • @kavithara9604
    @kavithara9604 2 ปีที่แล้ว +1

    Yes, Please cover materialized view in Oracle.

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +2

      Noted Kavi

  • @SC-mx4wp
    @SC-mx4wp 2 ปีที่แล้ว

    Nice Bro

  • @Avatar911
    @Avatar911 2 ปีที่แล้ว

    When user updates base table we can create trigger to refresh the materialised view right ?
    In this way we can retrieve updated data is it good practice?

  • @vinothvinuable
    @vinothvinuable ปีที่แล้ว

    Great ! It would be good if you could explain the index on view.

  • @PradeepKumar-gq3jd
    @PradeepKumar-gq3jd 2 ปีที่แล้ว

    Pls post a video about execution plan cardinality optimization

  • @SandeepSingh-qd1qy
    @SandeepSingh-qd1qy ปีที่แล้ว

    It was really nice explanation. Yaa could you please create video for oracle

  • @rockymarquiss8327
    @rockymarquiss8327 2 ปีที่แล้ว

    Took a while to figure out what you were saying when you're saying view - sounds like veev... LOL
    I can see a number of usual uses of materialized views.

  • @neerajchouksey3761
    @neerajchouksey3761 10 หลายเดือนก่อน

    thanks

  • @muninderkomire5617
    @muninderkomire5617 2 ปีที่แล้ว

    Great explanation. When are you going to conduct live sessions again?

  • @Alexpudow
    @Alexpudow ปีที่แล้ว

    In Qlik we use qvd the same way, and incremental load if need.

  • @siddhartharao8490
    @siddhartharao8490 2 ปีที่แล้ว +1

    Sir, Kindly make a video on Materialized views in Oracle also.! Thanks for explanation!

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      Sure will do it, thank you

  • @asifnowshari
    @asifnowshari 2 ปีที่แล้ว

    Hi TFQ...what about materialised views in MSSQL...

  • @ChetanSharma-oy4ge
    @ChetanSharma-oy4ge 11 หลายเดือนก่อน

    how the temp table is different from them, I mean it also stores the data for a particular session, and materialized view does the same thing..

  • @aniketjagdale7765
    @aniketjagdale7765 ปีที่แล้ว

    Hi pls create videos on indexes and constraints in SQL

  • @AtulSingh-be1jk
    @AtulSingh-be1jk 2 ปีที่แล้ว

    Hello sir,
    Thank you so much for this .
    Can you please make a separate video on the materialized view in Oracle.
    🙏🙏

    • @gtsanthosh9568
      @gtsanthosh9568 2 ปีที่แล้ว

      Yes, please make a video on Oracle materialized views..

  • @indhumathiarul1077
    @indhumathiarul1077 8 หลายเดือนก่อน

    Could you please explain Oracle MV in detail ?

  • @thamaraikannan7387
    @thamaraikannan7387 2 ปีที่แล้ว +2

    Bro, I don't have complete knowledge in mv views, only a little bit, if possible make a video for oracle mviews refresh method and auto refresh features how it's working.
    Thanks in advance.

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว +1

      Noted bro and will do

  • @tonysun203
    @tonysun203 2 ปีที่แล้ว +1

    Hi Thoufiq. May I know if the materialized view applicable to MS SQL and My SQL?

    • @techTFQ
      @techTFQ  2 ปีที่แล้ว

      Yes Tony, it is present in both these DB’s

  • @mohit3300
    @mohit3300 2 ปีที่แล้ว

    thank you very much for this great tutorial sir. I want to know if, in the MS SQL server all process is the same or not?

  • @nareshsmily226
    @nareshsmily226 2 ปีที่แล้ว

    Please make a video on temp table on Oracle

  • @sohailkan17
    @sohailkan17 ปีที่แล้ว

    Can you make a video on registered servers and stored procedures creation and execution

  • @Niamudeen
    @Niamudeen 2 วันที่ผ่านมา

    I was looking for something like this. I am working on a project with a very big volume of data. I think this would just work like a caching.

  • @rika0729
    @rika0729 11 หลายเดือนก่อน

    please the text editor / IDU u are using sir... or someone else, please tell..!!

    • @techTFQ
      @techTFQ  11 หลายเดือนก่อน

      Its PostgreSQL database and PgAdmin IDEA

  • @SravanthiKovvuri
    @SravanthiKovvuri ปีที่แล้ว

    If possible can you please make separate video of oracle views.

  • @mirageman2
    @mirageman2 2 ปีที่แล้ว

    Hi I would be interested in Materialized Views in Oracle and which options are at hand there.

  • @vijayjoshi-mw8cr
    @vijayjoshi-mw8cr ปีที่แล้ว

    Hello, Please make video on oracle database also...

  • @s0m30n3Jr
    @s0m30n3Jr ปีที่แล้ว

    please make a video of materialized view for Oracle. thank you.

  • @shilpagupta6376
    @shilpagupta6376 2 ปีที่แล้ว

    Please share a video on materialized view in Oracle.

  • @gilbertpradier
    @gilbertpradier ปีที่แล้ว

    Microsoft documentations says a materialized view persists the data returned from the view definition query and automatically gets updated as data changes in the underlying tables, not sure the documentation is wrong or not.

  • @AD-qk6zh
    @AD-qk6zh 2 ปีที่แล้ว

    Hey Thoufiq, the content on materialized view was really useful, you make the concept very clear and easy to understand. Would be really glad if you could make the materialized view content using oracle too. Also , in your views tutorial :: was used . Could you please teach as how this is done in oracle . Thanks a lot :)

  • @aniketjagdale7765
    @aniketjagdale7765 ปีที่แล้ว

    Hi pls create a materialized view video on Oracle database as well

  • @kallipto
    @kallipto 2 ปีที่แล้ว

    But why would I create a materialized view rather than create a table? What's the difference? It seems like they do quite similar things.

  • @victor.ruto.7919
    @victor.ruto.7919 2 ปีที่แล้ว

    Thank you, can you kindly make one for Oracle? had problem refreshing mv in Oracle

  • @Munichandra_Reddy
    @Munichandra_Reddy 2 ปีที่แล้ว

    Hi there!
    in this query has not worked in Microsoft sql server Database
    insert into random_tab
    select 1,rand() from GENERATE_SERIES(START = 1, STOP = 10)
    please try to explain on Ms SQL server