Forum > Databases

[Solved] Are there any limits on query results?

<< < (2/4) > >>

Zvoni:

--- Quote from: loaded on June 24, 2022, 02:59:33 pm ---In the query, if I exclude the columns where I keep the Files, the query completes without any problems.

--- End quote ---
Don't pull BLOBs along other columns from a Table. Period!
Only pull it if user explicitly demands it

--- Code: SQL  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---SELECT ID, Description, SomeOtherNonBlobs FROM MyTable;..//USER selects a specific RecordSELECT BLOB FROM MyTable WHERE ID=:SelectedID 

MarkMLl:

--- Quote from: Zvoni on June 27, 2022, 09:02:46 am ---Don't pull BLOBs along other columns from a Table. Period!
Only pull it if user explicitly demands it

--- End quote ---

I'm inclined to agree, but it's still unfortunate if the query doesn't complete in some determinate manner.

@loaded: what is the behaviour of psql if given the same query? Does it return the file content (even if in as raw bytes) or does it explicitly separate blob and non-blob columns?

MarkMLl

Zvoni:
Mark,
OP writes "columns" as in plural.
Not knowing how "large" and "small" his pdf's are in MB, multiplied with count of resulting records.....
.... should make an interesting read how many MB/GB he wants to push through the Wire of his LAN....

MarkMLl:

--- Quote from: Zvoni on June 27, 2022, 09:47:22 am ---Mark,
OP writes "columns" as in plural.
Not knowing how "large" and "small" his pdf's are in MB, multiplied with count of resulting records.....
.... should make an interesting read how many MB/GB he wants to push through the Wire of his LAN....

--- End quote ---

Hmm. In OP he says "It doesn't give any error. But it does not bring the records."... @loaded: are you confident that all activity has completed when you reached that conclusion, i.e. nothing more being moved over the LAN and all local memory thrashing resolved? Did the debugger show that the routine had returned a status, or did it remain hung if you left it e.g. overnight?

I've long been critical of the way that database frontends effectively fell over if asked to look at a large table, and this could of course be a variant of that sort of problem.

MarkMLl

loaded:
Thank you very much Zvoni for the reply.

--- Quote from: Zvoni on June 27, 2022, 09:02:46 am ---Don't pull BLOBs along other columns from a Table. Period! Only pull it if user explicitly demands it

--- End quote ---
Yes, I have adopted this way of working now.


--- Quote from: MarkMLl on June 27, 2022, 09:30:10 am ---@loaded: what is the behaviour of psql if given the same query? Does it return the file content (even if in as raw bytes) or does it explicitly separate blob and non-blob columns?

--- End quote ---
Yes I can try this on pgadmin. If I'm available tomorrow, I'll do it


--- Quote from: MarkMLl on June 27, 2022, 09:59:15 am ---Hmm. In OP he says "It doesn't give any error. But it does not bring the records."... @loaded: are you confident that all activity has completed when you reached that conclusion, i.e. nothing more being moved over the LAN and all local memory thrashing resolved? Did the debugger show that the routine had returned a status, or did it remain hung if you left it e.g. overnight?

--- End quote ---
To tell the truth, we solved the problem by removing the blob fields from the query directly as above, since our work was in a hurry. We've never had a chance to look at the debugger or other methods. I will try the methods you recommend at a convenient time and let you know the results.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version