1,606 questions
0
votes
1
answer
120
views
Why is DELETE much slower than TRUNCATE even when deleting all rows from a table in PostgreSQL?
In an application cleanup job, I need to remove all rows from a table regularly.
Table:
CREATE TABLE session_logs (
id BIGSERIAL PRIMARY KEY,
session_id TEXT,
created_at TIMESTAMPTZ, ...
-1
votes
1
answer
163
views
Unexpected behaviour of Trunc() function [duplicate]
I am experiencing an unexpected result from the Trunc() function, due to the lack of precision of floating-point numbers, when the float value stored is just below the positive integer value:
var
u1, ...
-2
votes
2
answers
183
views
Truncate a Datetime at different lengths without DATETRUNC [duplicate]
I want to truncate a datetime(7) at different lengths - determined by parts - in SQL Server 2019 (DATETRUNC starts on 2022 *). Kind of "year-month", "year-month-day", ... up to ...
1
vote
0
answers
20
views
Can't see lock on table begin truncated in PostgreSQL
I am truncating a large table - a few Terrabytes in size. To ensure that there are no locking issues, I executed the following query in another window and the results are also there. Why isn't the ...
0
votes
1
answer
71
views
Truncated table in Oracle
Do other users that have been granted permissions on that table lose them, if the table gets truncated and refreshed? I am trying to refresh data in one schema with data from different linked database....
0
votes
1
answer
173
views
Change font size when content is truncated
I have a div that can contain really long text (but not always). The requirement is to limit the text to three lines and truncate with ellipses. I've got this part figured out.
The second ...
0
votes
2
answers
101
views
Does truncating a file affect the cached contents?
Let's say I write some amount to some file A, then I close and reopen the file using open("A", O_TRUNC | O_WRONLY);. After this, I write the same amount again.
Will this be slower than a ...
0
votes
2
answers
81
views
redeclaration error for function to truncate a string in php
At the moment, I'm programming on a blog website where several blog posts will be listed!
For the first post it's already working with the attached code snippet but unfortunately not for all the ...
2
votes
2
answers
220
views
how to drop or truncate flow file content after handling it?
I am dealing with ETL tasks using NiFi. I observed that flow files were flowing from begin to end. In the fact, after some processor, I handled the data already. so I want to drop or truncate the ...
4
votes
3
answers
125
views
Create a string synopsis
Given a unknown string with an unknown size, e.g. a ScriptBlock expression or something like:
$Text = @'
LOREM IPSUM
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem ...
1
vote
1
answer
80
views
TRUNCATE TABLE PARTITION takes hours when deleting an empty partition on Sybase ASE 16
We are having a performance issue with our sybase ASE database version 16.0.03.11.
The TRUNCATE TABLE x PARTITION y runs for hours although the actual partition has 0 records.
How does the truncate ...
2
votes
1
answer
44
views
How can I maintain truncation with an ellipsis while also having vertical text centered?
I am trying to display content where book-spine is visually centered inside of shelf. It is supposed to look like a book's spine. When book-spine is too long, it should be truncated with an ellipsis.
...
3
votes
2
answers
110
views
Can `Seq.truncate` after `Seq.distinct` in F# be beneficial in terms of performance
In the solution of the Pangram exercise:
let totalAlphabetCount = 1 + int ('Z' - 'A')
let isPangram (input: string): bool =
input
|> Seq.filter System.Char.IsAsciiLetter
|> Seq.map ...
0
votes
0
answers
57
views
How to selectively truncate a file from a specific point to another in Python?
I am looking for a way to truncate a section of a file in Python, similar to how truncate() works, but instead of cutting off from the current position to the end of the file, I need to remove a ...
0
votes
0
answers
121
views
Why am I encountering an error with comm.Bcast() function in mpi4py when broadcasting a numpy array?
I am currently implementing parallel Python computation using the mpi4py package. In my code, there is a segment that uses comm.Bcast() to broadcast a list from rank0 to other ranks. However, I ...