Re: Fw: [SQL] and [index] mystery solved
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 38126
interpreted = N
texte = Bob McPeak wrote:> > For a variety of reasons (CORRUPTION!!) we're migrating many of our dbs to> SQL. Our trusty sys admin, Nick, has figured out a way to do a summary> report in the sql context founditems.> > Any general feedback on migrating to sql would be greatly appreciated.> Get yourself a book on SQL (for whatever flavor you are using). It istrivial to do summaries in SQL: select min(field) as min_field, other_field FROM table WHERE criteria GROUP BY other_fieldetc. It is also bad form to use select * ever, since that requiresthe database to do an additional lookup to the schema tables to figureout what fields are contained in that table. Always request only thefields you are going to immediately use, to limit the amount of networktraffic dedicated to wasted data.When you move to a pure relational database, make sure that you do all of your joins in SQL, rather than building them up in WebCat.You can even create VIEW's in the backend database that encapsulate your most common joins. Depending on the server, a VIEW will be somewhat or a lot faster (since the query is already compiled andoptimized).Learn how to use indexes effiently for your database. Oracle, forexample, will not use an index unless you have all of the indexfields in the WHERE clause (you can also use query hints). Thereare a lot of things that WebCatalog does for you that you will needto do yourself with you use an SQL database backend.HTHJohn--John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Bob McPeak wrote:> > For a variety of reasons (CORRUPTION!!) we're migrating many of our dbs to> SQL. Our trusty sys admin, Nick, has figured out a way to do a summary> report in the sql context founditems.> > Any general feedback on migrating to sql would be greatly appreciated.> Get yourself a book on SQL (for whatever flavor you are using). It istrivial to do summaries in SQL: select min(field) as min_field, other_field FROM table WHERE criteria GROUP BY other_fieldetc. It is also bad form to use select * ever, since that requiresthe database to do an additional lookup to the schema tables to figureout what fields are contained in that table. Always request only thefields you are going to immediately use, to limit the amount of networktraffic dedicated to wasted data.When you move to a pure relational database, make sure that you do all of your joins in SQL, rather than building them up in WebCat.You can even create VIEW's in the backend database that encapsulate your most common joins. Depending on the server, a VIEW will be somewhat or a lot faster (since the query is already compiled andoptimized).Learn how to use indexes effiently for your database. Oracle, forexample, will not use an index unless you have all of the indexfields in the WHERE clause (you can also use query hints). Thereare a lot of things that WebCatalog does for you that you will needto do yourself with you use an SQL database backend.HTHJohn--John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
John Peacock
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
SMSI FTP - calander system (2002)
IIS error and webcat (2000)
New Web Site Developers Database (1996)
No Line Breaks from OSX server (more) (2002)
Quickie question on the email templates (1997)
[date format] w/in sendmail (1997)
Image upload (2000)
ISAPI WC6a and Windows 2003 Web Edition (2006)
real beginner stumped (2000)
Emailer (1997)
[WebDNA] MacWorld Discount extension (2009)
Next X hits (1996)
frames & carts (1997)
SERIAL NUMBER PROBLEM *AGAIN*!!! (1998)
Searching multiple fields from one form field (1997)
Problem with broken images (2004)
multi-paragraph fields (1997)
OT: Prevent Caching js Files (2003)
Only charge card when product shipped ? (1997)
Nav. 4 probs with cart (1997)