Query of query or database
I'm creating an image gallery. My database has about 1000
records with 10 column.
Now I'm realising there's a lot of trips to the database.
Would it be better that when I init my app I store the "get all"
query and query that from that point? Or is the difference in
performance of querying a query as a oppose to a database not worth
it?
If you say I should query the query, how many records would
be too much to hold in memory.
Thanks
quote:
Originally posted by:
dandev
I'm creating an image gallery. My database has about 1000
records with 10 column.
Now I'm realising there's a lot of trips to the database.
Would it be better that when I init my app I store the "get all"
query and query that from that point? Or is the difference in
performance of querying a query as a oppose to a database not worth
it?
If you say I should query the query, how many records would
be too much to hold in memory.
Thanks
It would be better to just select the records you need.
Similar Messages
-
Select query from 2 schema & database
Hi,
what privileges should i give to execute select query from 2 schema & database in oracle
thanksHi,
not so clear, if you are looking for this
-- for other schema access
GRANT SELECT ON <scheman_name>.<table_name> TO <schema_name>;
or create the synonym
--for other database access you need to create db link -
Frm-40208 from running in query mode. cannot change database fields
Hi,
Could some one help me with this.
I am calling a form from another form. I am passing the parameter list to the calling form and doing a query by setting the block property. But when queries the message
FRM-40208 Form running in query mode. cannot change database fields .
I do not want the message to appear when they go the called form . Please some one could help me how could I avoid displaying the message.
Regards
BainHi,
Good day! I am working with a module that also calls another form. It uses call_form with query mode parameter set to query_only. My problem is, whenever i call the other form using the call_form, it would display the called module and then as it populates the detail block of the called form, it will display frm-40208 from running in query mode. cannot change database fields per record. What I want is for the message to be displayed only once.
I have tried capturing the error by using on-error trigger, but it doesn't go to that whenever the other form was being called. I think the message has to do with the post-query trigger, because it passes some values on a dbase block objects.
Do you have any suggested solutions or workarounds to make the message display only once whenever the other form is being invoked by the call_form?
I would greatly appreciate any suggestions/ideas.
Thanks and regards,
ASantiago -
Tell me select Query that HITs the database Directly ???
Hi,
I have a table, for this table in the Techinical Setttings I selected Buffering allowed, and buffering type is Full Bufferd.Now, I want a Select Query which hits the database directly, without fetching records from the BUFFER.
Except using SELECT BYPASSING BUFFER query ????
Regards,
V.Raghavender.hi,
· Any SELECT with a sub query or with joins
· Any set function (COUNT, MIN, MAX, SUM, AVG)
· GROUP BY
· HAVING
· SELECT DISTINCT
· ORDER BY
Examples:
SELECT /*@ SAP BYPASSING BUFFER */ * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ?
SELECT * FROM MYTAB WHERE KEY1 = ?
SELECT * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ? OR KEY1 = ?
SELECT MAX(DATA) FROM MYTAB WHERE KEY1 = ? KEY2 = ?
SELECT * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ? AND DATA =
(SELECT DATA FROM MYTAB WHERE KEY1 = ? AND KEY2 = ?)
if helpful pls award points.
sri -
Executing the SQL query across 2 different databases of Oracle
Hello All,
In Microsoft SQL server we can execute following type of SQL query across 2 different databases:
select * from TEST1.dbo.GENERIC_TABLE1 union select * from TEST2.dbo.GENERIC_TABLE2;
Here TEST1 and TEST2 are 2 different databases.
Can we do the same in Oracle?yes you can, but first one has to setup a database link
Look up CREATE DATABASE LINK and then take things from there!
P; -
Query for to get database size, used size, freesize, db size after drop
Pls give me a query for to get database size, used size, freesize, tablespacesize of sometables which is starting with 'RQ%'
I have to get result like this
Total size, used size, free size ,tablespace size of RQ tables alone
Reason why i go for "tablespace size of RQ tables" i want to know the size of database after deleting the rq tables
Pls reply
Si tried with
SELECT
--fs.tablespace_name name,
df.totalspace/1024/1024 mbytes,
(df.totalspace - fs.freespace)/1024/1024 used,
fs.freespace/1024/1024 free
FROM
(SELECT
--tablespace_name,
ROUND(SUM(bytes)) TotalSpace
FROM
dba_data_files
) df,
(SELECT
--tablespace_name,
ROUND(SUM(bytes)) FreeSpace
FROM
dba_free_space
) fs
i AM GETTING total bytes, used bytes, free bytes
I WANT TO include one more column.. database size after deleting rq tables
Pls reply
S
Edited by: AswinGousalya on Jul 10, 2009 2:17 PM -
DMV quesiton. Can not run the DMV query in non system database.
As the title .I can run following query when I use 'use master' , But don't work at the DB which be created my myself.
--Error massage
Msg 208, Level 16, State 1, Line 1
Invalid object name 'SYS.DM_EXEC_QUERY_STATS'.
--SQL Version : 2005
--compatibility level : 90
--The query
SELECT TOP 10
QT.TEXT AS STATEMENT_TEXT,
QP.QUERY_PLAN,
QS.TOTAL_WORKER_TIME AS CPU_TIME
FROM SYS.DM_EXEC_QUERY_STATS QS
CROSS APPLY SYS.DM_EXEC_SQL_TEXT (QS.SQL_HANDLE) AS QT
CROSS APPLY SYS.DM_EXEC_QUERY_PLAN (QS.PLAN_HANDLE) AS QP
ORDER BY TOTAL_WORKER_TIME DESCYes, you can run the query under none system database.... Make sure that your db is set 90.....
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Run query on all connected databases
Is there a way to run a query across all the databases that you have connections to using a script.
Fastest way I can think of is changing the connection in the drop-down list (upper right of the worksheet) between runs.
Regards,
K. -
Using NVL in Query of Query resulting in error
I'm still using CF8 and Oracle 11G back-end.
When I use NVL in the query of query I got error....Can't I use NVL to check on null value? Please help
Here is my codes:
<cfquery name="GetC2" datasource="#Trim(application.OracDSN)#">
SELECT CamID2, rel2_2,p_ln2,p_fn2,ins,l_year
FROM prt_temp
WHERE Ins = 'CC'
AND l_year = '1481'
AND NVL(Child_LN2,' ') <> ' '
AND NVL(Child_FN2,' ') <> ' '
</cfquery>
<cfif GetC2.Recordcount NEQ 0>
<cfquery name="CheckRel2C2" dbtype="QUERY">
SELECT CamID2, rel2_2
FROM GetC2
WHERE NVL(Rel2_2,' ') <> ' '
AND NVL(p_ln2,' ') = ' '
AND NVL(p_fn2,' ') = ' '
AND Ins = 'CC'
AND l_year = '1481'
</cfquery>
</cfif>
The error:
Error Executing Database Query.
Query Of Queries syntax error.
Encountered "NVL ( Rel2_2 ,. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,NVL is an Oracle function, and is not available in ColdFusion Query of Query. If you are trying to check for null values, then use IS NULL or IS NOT NULL. So
WHERE NVL(Rel2_2,' ') <> ' '
AND NVL(p_ln2,' ') = ' '
AND NVL(p_fn2,' ') = ' '
becomes
WHERE Rel2_2 IS NOT NULL
AND p_ln2 IS NULL
AND p_fn2 IS NULL
-Carl V. -
How to implement enter-query , execute-query in Apex Forms
Hi,
I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
Thanks in advance.Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
You can however achieve functionality similar to Enter Query / Execute Query through other means.
The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
Regards, -
Query on Query Limitations?
Hi,
Regarding the new query on query functionality in XI 3.1 SP2
1. Is there a limitation on the number of elements that come back from the first query that can be used as filter for the 2nd query? In the SQL, it looks like sometimes it translates into a large in list, translating the results of the first query and sometimes it has syntax just referring to the first query (in (select xxx from yy).
2. Is there a limit to how many queries on queries on queries can be included in a single .wid?Hi.
For IBM Informix the maximum query size is 32000 characters. So if the results feeding into the second query blow out the query size beyond this size we receive a database error.
The easiest method to check this is to build your first query that will return a large amount of records and then feed this into a second query using 'Result from another query'. Run the first query to get the results. Prior to running the second query, the SQL view will just show a reference to the results of the first query, as you have seen. Run the second query and when it either finishes or errors out, go back and check the second query SQL. It should now show the results from the first query within the SQL. To test, copy the second query SQL and run it directly on your database server to check if you get an error due to the maximum query size being to large.
I don't know how many times you can nest query on query. -
Error while accessing Query using Query Analyzer
dear experts...
while accesiing the query using query analayzer...
we are getting below error...
What has happened?
URL http://xxx.xxx.xxx.xx:XXXX/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex call was terminated because the corresponding service is not available.
Note
The termination occurred in system BI1 with error code 404 and for the reason Not found.
The selected virtual host was 0 .
What can I do?
Please select a valid URL.
If you do not yet have a user ID, contact your system administrator.
ErrorCode:ICF-NF-http-c:001-u:ANAND-l:E-i:PSRCCPRDA003_BI1_00-v:0-s:404-r:Notfound
HTTP 404 - Not found
Your SAP Internet Communication Framework Team
thanks for helping me...
anandHi friends,,
instead of getting the link like
http://128.222.125.57:9000/sap/bw/bex?cmd=ldoc&infocube=ZMC_SRH1&query=AGINGV21A&sap-language=EN(working link)
am getting below link...which is getting an error....
http://128.222.125.57:9000/sap/bw/://:/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=AGINGV21A
above marked is the unwanted thing so how can i change my link in query designer???
please suggest me firneds -
Unable to create new query using query manager
Hi friends,
I have been trying to create a query using query manager for couple of hours but still not able to.I am following the instructions given in oracle Peopletools 8.52 : Peoplesoft query
Chapter - creating new queries.
Below are the steps I am going through to create new query:
Step - I open the component Reporting Tools-> Query->Query Manager , I don't get the tabbed pages one for search an existing query and another for create new query.
Please follow this link to see how the page is displayed in first step:
http://uploadpic.org/v.php?img=EvMvVAXX1E
Step 2 - When I click on create new query link, I am redirected to a page where it asks for record name to add in the query. But, even this page is not displayed as how it supposed to be
http://uploadpic.org/v.php?img=GzHh3f6krU
Step 3 - Following the above step, when I click on Person record to add into my query I am asked to select the fields that I want to display in the output.
But I somehow do not get the proper tabbed pages where individual pages are there to add the attributes to complete the query like adding multiple records, fields, query, expressions, prompt...etc
http://uploadpic.org/v.php?img=Wbbla3Q3jE
I am neither able to select multiple records in my query nor able to customize my query to get the desired results.
Below is the query that I want to create using query manager:
SELECT P.EMPLID,P.BIRTHDATE, N.NAME, A.ADDRESS1, A.ADDRESS2, A.CITY
FROM PS_PERSON P, PS_NAMES N, PS_ADDRESSES A
WHERE P.EMPLID = N.EMPLID AND
N.EMPLID = A.EMPLID AND
P.BIRTHDATE BETWEEN to_date('1990/1/1','yyyy/mm/dd') and to_date('1991/1/1','yyyy/mm/dd');Hi,
As I cannot access your screenshot by the blocking of company firewall rules.
I'm guessing currently you are using PT 8.52.00 version, correct?
This should be a bug, that you need to apply the 8.52.0X patch, not sure which patch fix this, you can apply the latest one to solve this issue for no tab page of query manager. (PT 8.52.06)
Hope this helps.
Thanks,
Saxon SI -
Hey All
How I can run query from Query Manager from addon level?
regards
Krzysztof SalaHi Krzysztof,
There is no object in the SDK to access and execute the queries programmatically so you have to use the UI to simulate the user opening and selecting the query (ie activate the menu object for the query you want to run, populate any parameters then click on the OK button to execute the query). It's a bit of a messy solution but it can work ok.
The alternative is to execute your query from within your add-on and display the results in a new form. This form can just have a matrix and an OK button so it's very easy to create (via Screenpainter or at runtime).
Hope this helps,
Owen -
Please suggest a select query / sub query with out using any subprograms or
source table: Three columns ORIGIN, DESTINATION,MILES
Origin Destination Miles
Sydney Melbourne 1000
Perth Adelaide 3000
Canberra Melbounre 700
Melbourne Sydney 1000
Brisbane Sydney 1000
Perth Darwin 4000
Sydney Brisbane 1000
out put :Three columns ORIGIN, DESTINATION,MILES
Duplicate routes are to be ignored so the output is
Origin Destination Miles
Sydney Melbourne 1000
Perth Adelaide 3000
Canberra Melbounre 700
Brisbane Sydney 1000
Perth Darwin 4000
Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Hi,
user9368047 wrote:
... Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Why? If the most efficient way to get the results you want involves using a function, why wouldn't you use it?
Here's one way, without any functions:
SELECT a.*
FROM source_table a
LEFT OUTER JOIN source_table b ON a.origin = b.destination
AND a.destination = b.origin
AND a.miles = b.miles
WHERE b.origin > a.origin -- Not b.origin > b.origin
OR b.origin IS NULL
;If you'd care to post CREATE TABLE and INSERT statements for your sample data, then I could test this.
Edited by: Frank Kulash on Nov 6, 2012 7:39 PM
Corrected WHERE clause after MLVrown (below)
Maybe you are looking for
-
Report print problems windows 7
Hi All, Am trying to get to the bottom of a really weird error that occurs periodically. When trying to print an HTML report using the Print Report VI occasionally an IE error is thrown. An error dialogue with some info is shown, it says the error o
-
Currency conversion by Calendar month in the query?
Hellow... Users want DB currencies when executing query at first. And then want to change currency conversion by Calendar month in the query, if navigating by target currency. Tried as created TEST Currency Translation Key. Database currency is diffe
-
Classless netmask in Cisco RV 120 W
I need to assign the mask 255.255.252.0 in the LAN interface but the web configurator does not allow it. The web configurator only permit assign the 255.255.255.0 netmask. My LAN segment is greater than 254 network devices and I cannot understand how
-
I am trying to Print MS Word documents from DMS when like a Production Order is released. It is understood that Adobe Service is required for Adobe file printing to accomplish this, however, is there a method to Print Microsoft documents in Backgrou
-
My program switches between frames. One frame loses its display and there is no error. Can I do anything about this?