by the way the official doc says: Never, never, NEVER use Python string concatenation (+) or string parameters interpolation (%) to pass variables to a SQL query string. Not even at gunpoint.
for psycopg2 but I was wondering is it ok to do string concatenation just for visual intendation if the query is long and fixed?
Like "Select * " + <this would be on new line> "FROM my_table"
You need to get some measurements / instrumentation in place so you know how long each part of the process is taking, otherwise you are guessing where the bottleneck is.
but sadly i don't have pycharm professional, so i can't do easy profiling.
but true talking without numbers makes no sense, just wanted to get a feel for the times. but if you say it should take minutes i will for sure look into this at some point
Hello, I know this is a noSQL question, but there is no noSql chatroom, so this seemed most appropriate:
Using Cassandra, I am trying to aggregate rows which each contain a column of Set<BIGINT>. I would like the result to contain the sum of all sets, where null would be equivalent to the empty set. I expected sum(my_set_column) to do this, but the set type is not supported by this aggregate. Does anyone know of a way to aggregate this using existing cassandra built-ins? Thanks!
Do Views get deleted after a certain time? I can't find information about this online. I know that views are just an alias for a more comlex query. But does a view that is generated once stay there forever?
@Hakaishin : A view should remain until dropped, but depending on the nature of how it has been coded, it could become rapidly deprecated / not fit for purpose
Small rant, but I thought the whole idea of using a db and a query planer/optimizer is that I DONT have to think too much and fight too much with the details. But it looks like I still have to do everything...
hey guys I have a question i am getting a syntax error could someone point out the problem? INSERT INTO contacts-submitted (name, phone, email, topic, message) VALUES ('$name', '$phone', '$email', '$topic', '$message' )