X

Celebrating the joy and power of Oracle SQL with the Oracle Developer Advocate team

  • September 14, 2015

#AskSQL Twitter Q&A Recap

Chris Saxon
Developer Advocate
Last Wednesday Connor and myself hosted a Twitter Q&A with the hashtag #AskSQL.

In case you missed it, here's some of the highlights:


Ask Tom

@OracleDatabase

Here's a question to kick the #AskSQL Q&A off. You recently took over AskTom.oracle.com - how's that been going?

@chrisrsaxon - .@OracleDatabase Great! It's an amazing honour to be answering on Ask Tom.

@connor_mc_d - #asksql Its challenging knowing that its Tom we're taking over from, but so far its been great fun and very interesting

@chrisrsaxon - .@connor_mc_d I still find it hard to believe I'm answering there. Ask Tom was where I learned about Oracle back in 2003... :) #asksql

@connor_mc_d - #asksql Tom started helping me (&veveryone) way back in the late 90's on comp.databases.oracle .server. So its been at least 20yrs of help

@OracleDatabase

Are there best practice tips for submitting to AskTom.oracle.com? #AskSQL

@chrisrsaxon - .@OracleDatabase Funny you should ask :) I have a post today discussing what makes a good/bad q blogs.oracle.com/sql/entry/ask_… #asksql

@connor_mc_d - .@OracleDatabase Priority #1 - if possible, give us a test case, ie, a set of scripts we can run to replicate the problem #asksql

@chrisrsaxon - .@connor_mc_d @OracleDatabase This is key. Without it we can spend ages trying to re-create your issue without success #asksql

@connor_mc_d - .@OracleDatabase Tom used to often refer people to this picture goo.gl/8AONm4 But basically its "help us to help you" #asksql


Performance

@OracleDBDev

What is the most common mistake in SQL that degrades performance? #asksql

@connor_mc_d - @OracleDBDev Expressions in predicates that potentially disable index usage is one we see all the time #asksql

@connor_mc_d - @OracleDBDev And a particular example of that is when datatype mismatches in SQL, eg where STRING_COL = 123 #AskSQL

@PrasannaPeshkar

Can you please tell important performance tip for faster SQL queries. #asksql

@chrisrsaxon - .@PrasannaPeshkar Learn how to read and understand execution plans. These show you what your query is actually doing... #asksql

@chrisrsaxon - .@PrasannaPeshkar ... and therefore what you need to do to fix it #asksql

@connor_mc_d - .@PrasannaPeshkar Google for gather_plan_statistics hint. Its an awesome way to see *where* to focus #asksql

@chrisrsaxon - .@connor_mc_d @PrasannaPeshkar Or use #sqldev ;) blogs.oracle.com/sql/entry/quer… #asksql

Model Clause

@galobalda

In your opinion, what are the use cases where the model clause shines when compared to other sql constructs? #asksql

@chrisrsaxon - .@galobalda I think of it as like having spreadsheet abilities in SQL, enabling you to get vals from other cols and rows #asksql

@connor_mc_d - #asksql 1/2 MODEL clause is perhaps over complex in that it can do *so* much, but I think its best use is as getting data back into the db

@connor_mc_d - #asksql 2/2 since you can take data in 1000's of spreadsheets, get it back into the db where it belongs, and use MODEL to mimic the formulas

@connor_mc_d - #asksql You see lots of "quirky" uses of MODEL (eg solving sudoku) but that doesnt mean there are not still genuine use cases

@connor_mc_d - #asksql or as Rob did, you can use the MODEL clause for art work :-) goo.gl/u1KNQm

@chrisrsaxon - .@galobalda I also used it in a recent AskTom q about transposing rows and cols asktom.oracle.com/pls/apex/f?p=1… #asksql


Case vs Decode

@PrasannaPeshkar

CASE or IF or DECODE ? What's your opinion on this ? #asksql

@chrisrsaxon - .@PrasannaPeshkar Well if doesn't work in SQL. Generally I prefer CASE - it's easier to understand #asksql

@connor_mc_d - .@PrasannaPeshkar I use decode a lot, but prefer CASE. More understandable to most devs (eg non oracle), and seamless SQL => PLSQL #asksql


Favourite Topics

@thatjeffsmith

. @connor_mc_d @chrisrsaxon if 'binds' was @OracleAskTom's goto answer or favorite topic, what are yours? #asksql

@connor_mc_d - @thatjeffsmith for me, I love solutions with analytics - although I think 12c pattern matching may take over from that as I learn it #AskSql

@chrisrsaxon - .@thatjeffsmith @connor_mc_d agree with Connor on analytics. I really like temporal validity in 12c #asksql

12c

@OracleDatabase

Top 3 favorite #DB12c features? #AskSQL #shamelessplug

@connor_mc_d - @OracleDatabase 1) in-memory 2) better defaults 3) pattern matching #asksql

@connor_mc_d - @OracleDatabase People have been waiting for "col default sequence.nextval" since 1992 :-) Now we have it #asksql

@chrisrsaxon - .@OracleDatabase I've already said temp validity :) For the other two I think In-Memory is great and the EBR enhancements #asksql

@connor_mc_d - @chrisrsaxon @OracleDatabase Agreed. EBR is a hidden gem that people so take a fresh look at in 12c #asksql

The Future of SQL

@galobalda

What SQL enhancements would you like to see in future Oracle versions? #asksql

@chrisrsaxon - .@galobalda Better support for cross-row and cross-table constraints. #asksql

@chrisrsaxon - .@galobalda e.g. extending temporal validity so you can ensure date ranges don't overlap #asksql

@connor_mc_d - @chrisrsaxon @galobalda Agreed. The concept of declarative assertions would be huge #asksql

@connor_mc_d - .@galobalda Not particular features as such, but SQL as a means to query any and all data (relational, big data etc etc). #asksql


If you want to see all the tweets, just search for #AskSQL.

Thanks to everyone who took part, it was great chatting with you!

If you missed out you can wait for our next session, put your questions to the panel at OOW15 or use the comments form on this blog. We look forward to hearing from you.


Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services