SQL Daily

@sqldaily

Daily Oracle SQL tips from the Oracle Developer Advocates for SQL

Vrijeme pridruživanja: siječanj 2015.

Tweetovi

Blokirali ste korisnika/cu @sqldaily

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @sqldaily

  1. Prikvačeni tweet
    13. pro 2019.

    is the most in-demand US tech skill (according to Indeed) And has been for years! Learn this valuable language in the FREE online course, Databases for Developers:

    Poništi
  2. prije 21 sat

    If a query switches from a fast plan to a slow one, get the fast plan back with SPM * Capture the 'problem' SQL statement plan in a SQL plan baseline * Run the SPM evolve task for this SQL plan baseline * Accept the recommended plan explains

    Poništi
  3. 5. velj

    Want to find all the rows in one table with (at least) one matching row in another? Use EXISTS select * from t1 where exists ( select * from t2 where t1.col = t2.col ) Or use NOT EXISTS to find the unmatched values discusses

    Poništi
  4. 4. velj

    Want to extract data to CSV format to read in ? Run the following or SET sqlformat csv SET feedback off SET echo off spool results.csv SELECT * FROM ... / SELECT * FROM ... / spool off explains

    Poništi
  5. 3. velj

    “If you write that is technically incorrect it’s not Oracle’s fault if sometimes the SQL completes without an error" - He shows how queries with "obviously wrong" to_number ( 'X' ) can still return no rows instead of an exception

    Poništi
  6. 31. sij

    In attributes order is "unimportant" So this { "this": "v1", "that": "v2" } equals this { "that": "v2", "this": "v1" } So how do you check this in ?! With JSON_equal! select * from dual where JSON_equal ( j1, j2 ) demos

    Poništi
  7. 30. sij

    Why is my SLOOOOOOOOOOW?!! shows you how to use the Instance Viewer in A handy performance dashboard showing what's going on in See the tour at

    Poništi
  8. 29. sij

    Automatic Indexing in Oracle's Autonomous Database analyzes your application's Then creates indexes needed to make it faster All by itself But how does it work? has been digging into the details Find out at

    Poništi
  9. 28. sij

    BETWEEN is inclusive at the start and end, so: c1 BETWEEN v1 AND v2 Is the same as c1 >= v1 AND c1 <= v2 This can lead to double-counting the end value It's better to use: c1 >= v1 AND c1 < v2 + 1

    Poništi
  10. 27. sij

    The key to fast is * acquire the data we need as efficiently as possible * post-process the data ... as efficiently as possible With careful index engineering you can meet these goals In this case study, shows you how to do this

    Poništi
  11. 24. sij

    Want to access tables in another schema without having to type the schema name? You can create a synonym: create synonym your_usr.tab for other_usr.tab Or in run: alter session set current_schema = other_usr

    Poništi
  12. 23. sij

    Databases store DATE/TIMESTAMP values in an internal format If you want to show these value in a given format, e.g.: DD MON YYYY or YYYY MM DD HH24:MI you need to set the format when querying the values

    Poništi
  13. 22. sij

    GROUP BY <> ORDER BY ! Grouping data *might* return the values in the "correct" order But this is NOT guaranteed If you need ordered results, sort the groups: GROUP BY c1, c2, ... ORDER BY c1, c2, ...

    Poništi
  14. 21. sij

    Want to split a C,S,V to rows? Join to a table with NUM VALUEs rows Substring the values out select regexp_substr(col, '[^,]+', 1, r.l) from tab, lateral ( select level l from dual connect by level <= length ( regexp_replace (col, '[^,]+') ) + 1 ) r

    Poništi
  15. 20. sij

    Tables are the foundation of your There are many types, including - Heap organized - Index-organized - External - Temporary - Partitioned - Clustered Each has its pros and cons So it's worth thinking about which type to use Learn more at

    Poništi
  16. 17. sij

    To tune statements, you need to see what the database did You can view this in the execution plan shows you how to do this using DBMS_XPLAN.DISPLAY_CURSOR

    Poništi
  17. 16. sij

    Using Liquibase to automate your database deployments? You can now use to generate and apply database changelogs shows you how

    Poništi
  18. 15. sij

    A NATURAL JOIN infers the join criteria from the column names So if T1 & T2 have ID & INS_DATE, then t1 NATURAL JOIN t2 => t1 JOIN t2 ON = AND t1.ins_date = t2.ins_date explains

    Poništi
  19. 14. sij

    The physical design of your database tables - how the data are stored - makes a huge difference to the performance of your discusses 3 common mistakes, - NOT setting PCTFREE - NOT using compression - NOT using index-organized tables

    Poništi
  20. 13. sij

    DDL in Oracle Database commits... ...unless you're creating a PRIVATE TEMPORARY TABLE Which means you can create one part-way through a transaction And still rollback work before it

    Poništi
  21. 10. sij

    Want an auto-incrementing numeric column? Use an IDENTITY! <col> int generated [ always | by default [ on null ] ] as identity discusses

    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·