Why I Don't Use The Database Editor And How I USe My Chosen Editor

My SQL Editor of choice is SquirrelSQL.
I don't think that I do anything too fancy but I still use it over the one built into IDEA for the following reasons:

  • SquirrelSQL allows you to cache tables, views and procedures on startup
    • In IDEA I seem to have to click Synchronise on every table to achieve this
  • Clicking on a table in SquirrelSQL gives me a view of the columns, primary keys, indexes, content etc etc
    • IDEA has the table editor to show the content and copy DDL to see the structure
    • Copy DDL fails if you haven't already synchronised the table (why doesn't IDEA syncronise automatically here??)
  • SquirrelSQL lets me right click on a table and generate a select script
  • SquirrelSQL lets me right click on the results and "Copy as SQL UPDATE-SET statement" or "Copy as SQL INSERT-VALUES statement"
  • SquirrelSQL lets me run an explain plan for my query
  • SquirrelSQL lets me double click on a row in the output to see the contents to see full data and copy it
    • IDEA allows you to use Ctrl-C but there is nothing in the context menu to copy a single cell
    • If you have large data IDEA doesn't copy it all e.g. I have 529.82k (204.80k loaded) from an XML_TYPE column. Copy and paste only copies the 204.80k



It doesn't seem like too much, but these are enough to prevent me using IDEA as a DB editor.

5 comments
Comment actions Permalink

SquirrelSQL deafults to returning 100 rows. However, you can tick off this option or change the value in a tickbox/textbox just above the editor.
I often tick off and rerun when I know the dataset isn't massive, then I tick it back on again.
In IDEA, this setting is hidden away and a PITA to switch back and forth like this.

0
Comment actions Permalink

HeidiSQL is far better... and looks good.
http://www.heidisql.com/

0
Comment actions Permalink

RazorSQL is pretty good and cross-platform - http://www.razorsql.com. Not freeware. It's not much of a looker though. I will be more then happy to switch to DBE though once it's matured some.

0
Comment actions Permalink

Hi, everybody! If someone is still here I want to answer the original question with some fresh data. As you may be know, we released DataGrip in 2015, and it is the same as IntelliJ's database support.

  • SquirrelSQL allows you to cache tables, views and procedures on startup
    • In IDEA I seem to have to click Synchronise on every table to achieve this

Now there is Auto-sync check-box in IntelliJ

  • Clicking on a table in SquirrelSQL gives me a view of the columns, primary keys, indexes, content etc etc
    • IDEA has the table editor to show the content and copy DDL to see the structure
    • Copy DDL fails if you haven't already synchronised the table (why doesn't IDEA syncronise automatically here??)

Now if you click on the table you see the data, but there is DDL button. Also DDL can be generated by SQL generator: Context menu -> SQL scripts -> SQL generator

  • SquirrelSQL lets me right click on a table and generate a select script

The same in DataGrip and IntelliJ! Just click on the table and see first N rows. IF you want to see first N rows when you are inside SQL editor, use SELECT * FROM live template.

  • SquirrelSQL lets me right click on the results and "Copy as SQL UPDATE-SET statement" or "Copy as SQL INSERT-VALUES statement"

We have the same feature now.

  • SquirrelSQL lets me run an explain plan for my query

Context menu on a query -> Explain plan

  • SquirrelSQL lets me double click on a row in the output to see the contents to see full data and copy it
    • IDEA allows you to use Ctrl-C but there is nothing in the context menu to copy a single cell 

We have the same: click Edit Maximized in the context menu. 

    • If you have large data IDEA doesn't copy it all e.g. I have 529.82k (204.80k loaded) from an XML_TYPE column. Copy and paste only copies the 204.80k

You can just set this size in Settings -> Database -> Data Views 

0

Please sign in to leave a comment.