tag:blogger.com,1999:blog-426922399870577072.post9154054443702895942..comments2024-03-29T03:39:01.984-04:00Comments on The Database Programmer: Database Performance: Pay Me Now or Pay Me LaterKenDownshttp://www.blogger.com/profile/11117175783163937575noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-426922399870577072.post-22653140649139074612020-03-06T07:21:44.968-05:002020-03-06T07:21:44.968-05:00Great blog !It is best institute.Top Training inst...Great blog !It is best institute.Top Training institute In chennai<br />http://chennaitraining.in/openspan-training-in-chennai/ <br />http://chennaitraining.in/uipath-training-in-chennai/ <br />http://chennaitraining.in/automation-anywhere-training-in-chennai/ <br />http://chennaitraining.in/microsoft-azure-training-in-chennai/ <br />http://chennaitraining.in/workday-training-in-chennai/ <br />http://chennaitraining.in/vmware-training-in-chennai/ Sudharshanhttps://www.blogger.com/profile/01822188037433154768noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-57976016281802389102014-04-26T07:21:59.441-04:002014-04-26T07:21:59.441-04:00Having the item price in the order line table is n...Having the item price in the order line table is not a good example for normalisation, because it's not really redundant. Item prices change, discounts are given etc. and you always need to know the price that was actually billed, which may or may not be the current price in the product table.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-45408803529301119792008-07-22T09:34:00.000-04:002008-07-22T09:34:00.000-04:00Crystal: In the context of the post, a non-materia...Crystal: In the context of the post, a non-materialized <BR/>traditional view is a pay-me-later approach. <BR/><BR/>Materialized Views are not natively supported (to my knowledge as of July 2008) in MySQL or PostgreSQL, and as I am not currently using SQL Server or Oracle I prefer not to comment overmuch on their support.<BR/><BR/>That being said, materialized views appear to give you some fine control over the pay-me-now or pay-me-later decision by letting you control when the view is refreshed. This is nice, and it would be nice if support were more widespread in open source db's.KenDownshttps://www.blogger.com/profile/11117175783163937575noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-63948781877450753032008-07-22T09:08:00.000-04:002008-07-22T09:08:00.000-04:00I think you oversimplified views by placing them o...I think you oversimplified views by placing them only in the "pay me later" category. You are overlooking materialized views, which can provide "pay me now" denormalized storage.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-27522550635997137692008-07-07T16:30:00.000-04:002008-07-07T16:30:00.000-04:00Jochen: good point, I have added an addendum to th...Jochen: good point, I have added an addendum to the OP.KenDownshttps://www.blogger.com/profile/11117175783163937575noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-82669277121129444172008-07-07T15:45:00.000-04:002008-07-07T15:45:00.000-04:00Your over-simplifying things a bit with your "inde...Your over-simplifying things a bit with your "indexes help selects but hurt insert/update/delete".<BR/><BR/>If your indexes are well chosen, they also speed up your updates and deletes - under the assumption that you don't delete or update the full table all the time, but rather a few rows. And there an index on the proper SARGs will help finding the rows to be updated.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-31298876607589498432008-07-07T07:07:00.000-04:002008-07-07T07:07:00.000-04:00Anonymous: not a very enlightening comment. The o...Anonymous: not a very enlightening comment. The original statement stands: indexes speed up SELECT statements, that's what they do. The next paragraph illustrates exactly how this works from the application viewpoint.KenDownshttps://www.blogger.com/profile/11117175783163937575noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-43717566200838086562008-07-07T04:02:00.000-04:002008-07-07T04:02:00.000-04:00Your comment ->An index speeds up SELECT operation...Your comment -<BR/><BR/>>An index speeds up SELECT operations. <BR/><BR/>Isn't strictly correct, I would state it as -<BR/><BR/>>An index *may* speed up a SELECT operation.<BR/><BR/>Since clearly -<BR/><BR/>1) The index might not be used<BR/>2) Using the INDEX might actually be slower than doing a FULL TABLE SCAN operation.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-28954823426845055522008-07-06T23:39:00.000-04:002008-07-06T23:39:00.000-04:00Great post. I often find that app developers want...Great post. I often find that app developers want a "pay me later" approach -- leaving data querying and manipulation as an afterthought. Sometimes this is a perfectly valid approach, sometimes not.<BR/><BR/>The most extreme case was a recent scenario in which a developer wanted to pare a fairly complex app down to 4 tables -- each holding a hierarchical xml blob. You can imagine how functional that was for downstream reporting....Beth Breidenbachhttps://www.blogger.com/profile/16935018156336017252noreply@blogger.com