Forum > Databases

[Solved] Are there any limits on query results?

(1/4) > >>

loaded:
Hi All,
In my postgresql database I use, I have columns of bytea type in a table I created. In these columns, I store pdf-like large and small files.
There was no problem so far, but after the last records I added, the queries are now inconclusive.
It doesn't give any error. But it does not bring the records.
In the query, if I exclude the columns where I keep the Files, the query completes without any problems.
As I understand there is a limit to the query, is it possible to increase it?

MarkMLl:
I was not aware of one, unless you explicitly put a limit clause in the query.

You might need to check your server logs to see what query is actually being generated (I think this is a good use case for the discussion a couple of weeks ago about being able to access actual queries on the client).

MarkMLl

loaded:
Thank you very much MarkMLl for the answer.


--- Quote from: MarkMLl on June 24, 2022, 03:11:32 pm ---I was not aware of one, unless you explicitly put a limit clause in the query.

--- End quote ---
Yes, that's how I knew it too.


--- Quote from: MarkMLl on June 24, 2022, 03:11:32 pm ---You might need to check your server logs to see what query is actually being generated

--- End quote ---
That's a good idea, let's see what's going on under the hood.

MarkMLl:

--- Quote from: loaded on June 24, 2022, 03:19:10 pm ---That's a good idea, let's see what's going on under the hood.

--- End quote ---

I assume that if SSL is in use then something like Wireshark won't show you anything useful. I've definitely been able to examine actual queries in PostgreSQL's server log in the past, but I can't remember whether I needed to tweak a configuration file to make it so.

Also if you've got FPC/RTL/FCL built with debugging options then Lazarus's debugger should be able to take you as deep as you need. However broadly speaking this is why I prefer to build queries myself: the scripting that drives the business can display a query in its entirely if there's a syntax error, I can examine complex joins in detail, and in extremis I can use Postgres's EXPLAIN to weed out details which would e.g. force a sequential scan rather than indexed access.

MarkMLl

loaded:

--- Quote from: MarkMLl on June 24, 2022, 04:10:27 pm ---SSL... Wireshark....debugging....Postgres's EXPLAIN to weed out details which would e.g. force a sequential scan rather than indexed access.

--- End quote ---
Good ideas. Master MarkMLl, you are like a lighthouse.

Navigation

[0] Message Index

[#] Next page

Go to full version