Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> When working with big tables, its super annoying to select all but one column

What's the use case for that? In fact, I can hardly understand the benefit of projecting at all, except at the very end. Why would you want to do it? Is there a performance benefit?



I would love this addition in SQL. My work is largely exploratory with SQL. 99% of my queries will never get saved anywhere.

At the end of the day it's just syntactic sugar, but sometimes when writing reports you sometimes don't want to include a single column like a sequential key, because it's not relevant information to the end user or exploration.

Another reason is that some text columns are long enough that just absolutely destroy readability in things like psql. Often I just want to get a feel for what's in the data and removing those annoying text fields to make psql readable is a pain. You have to run a `select * from table limit 0`, copy that into a text file, then `s/ +\| +/, /g` the columns list, then remove the annoying field... then throw it back into your query. Takes about 45 seconds to do all that and that adds up!


Right, I understand why you'd want to project at the very end of the query, i.e. suppress some columns from being shown. Other than that, I don't see the point, unless there's a performance impact. Keeping columns around doesn't actually change the result of the query in any way.


You've definitely missed the point because you're concerned about the "very end of the query". I'm describing both a reporting and more importantly as far as I'm concerned an explorative process that's disrupted by the silly need to list out all columns. Performance is irrelevant.


Yes, I know I've missed the point. That's why I asked my question in the first place! My question was:

> What's the use case for that? In fact, I can hardly understand the benefit of projecting at all, except at the very end. Why would you want to do it? Is there a performance benefit?

and I meant it literally. It's not an oblique, rhetorical way of saying "you don't need to do this". It was a genuine question!

You've answered that it's convenient when doing exploratory work. Thank you. That helps me understand better.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: