Keep the query results set all paging
I have a query back thouands of records. For do not impact performance display and paging, which would be the best way without use of query caching? Is it possible to keep the first recordset query time she and her use in Exchange?
Load balancing definitely throws a wrinkle by using shared memory. There are ways to address these problems, but they all come with the pros and cons, just basically choose what pros like you and what the disadvantages that you can live with.
I.E. you can use sessions. So when a user first access your application, all future queries are sent to the same server that processes requests for first. But this means that if this server will see, all users currently glued to it are s.o.l.
I saw other people using databases for the persistent memory. But then, you have the LAG involved in obtaining data from the database on every request, although it should be easy fast queries to do this. Side pro, it does not matter which server processes the request.
It would be different then just re - run the original query every time, but rather store the original query results into a temporary table space so that any complexity which may exist should not be repeated.
Tags: ColdFusion
Similar Questions
-
The query results: extract all lines?
I was looking for a feature that will allow me to choose to return "all records" in the query results window. The current behavior is fetching 50 files at a time (for example fetch 50 records when you scroll the results = s-l-o-w). What I would do, that is 'Recover all lines' and then use for the scroll bar to scroll "smoothly" to the last record. For example, the 8.0.6 Query Builder version has this feature and SQL Developer 3.0, if I right click on the results. I choose 'Count lines... ". ", looks like it would be a perfect place to put an option"retrieve all rows.If your application is to be able to quickly reach the last record in a query you can press Ctrl + Page Down (with emphasis in the grid of results) and you will automatically position your view to the last record in the query automatically go get all the results in the process.
You have no need to do anything with the mouse scroll is actually the fastest way to reach the desired line.
-
Problem with the query result set * STILL a QUESTION *.
Summary
What I am tring to do is to return output to the data points that currently have no values.
* Here it is sample data for reasons explaining my question (my data set is MUCH bigger)
xTable
Desired outputYEAR PEOPLE ITEMS TYPE_NUMBER TYPE_DESC CLASS 2010 1 1 REG 1 2010 2 3 2 MISC 1 2010 5 4 3 WEEK 1 2010 1 REG 2 2010 2 MISC 2 2010 3 WEEK 2 2009 1 1 REG 1 2009 2 3 2 MISC 1 2009 5 4 3 WEEK 1 2009 1 REG 2 2009 2 MISC 2 2009 3 WEEK 2 ... (there's over 100 other unique CLASS values)
Oracle: 10.2 GYR PEOPLE ITEMS TOTAL PEOPLE TOTAL_ITEMS 2010 - - - - -- (Class 2 result set) /* FYI, If i wanted the class 1 result set it would look like this: YR PEOPLE ITEMS TOTAL PEOPLE TOTAL_ITEMS 2010 8 7 16 14 -- (Class 1 result set)*/
Currently, the query above will return no rows.select 2010 as yr, nvl(f.people,'-') as people nvl(f.items,'-') as items nvl(to_char(sum(f.people)),'-') as total_people, nvl(to_char(sum(f.items)),'-') as total_items, from Xtable, (2010 as yr, sum(items)as items sum(people) as people from xTable where person_id = 99999 and type_number in (1,2,3) and year = 2010 and class = 2 or class = 1 ) f where person_id = 99999 and type_number in (1,2,3) and yr = f.yr and (year <= 2010 or year = 2010) and (class = 2 or class = 1) group by f.people, f.items
Published by: user652714 on February 2, 2010 13:04How about this?
SQL> WITH xTable AS 2 ( 3 SELECT 2010 AS YEAR, 1 AS PEOPLE, 0 AS ITEMS, 1 AS TYPE_NUMBER, 'REG' AS TYPE_DESC, 1 AS CLASS FROM DUAL UNION ALL 4 SELECT 2010 AS YEAR, 2 AS PEOPLE, 3 AS ITEMS, 2 AS TYPE_NUMBER, 'MISC' AS TYPE_DESC, 1 AS CLASS FROM DUAL UNION ALL 5 SELECT 2010 AS YEAR, 5 AS PEOPLE, 4 AS ITEMS, 3 AS TYPE_NUMBER, 'WEEK' AS TYPE_DESC, 1 AS CLASS FROM DUAL UNION ALL 6 SELECT 2010 AS YEAR, NULL AS PEOPLE, NULL AS ITEMS, 1 AS TYPE_NUMBER, 'REG' AS TYPE_DESC, 2 AS CLASS FROM DUAL UNION ALL 7 SELECT 2010 AS YEAR, NULL AS PEOPLE, NULL AS ITEMS, 2 AS TYPE_NUMBER, 'MISC' AS TYPE_DESC, 2 AS CLASS FROM DUAL UNION ALL 8 SELECT 2010 AS YEAR, NULL AS PEOPLE, NULL AS ITEMS, 3 AS TYPE_NUMBER, 'WEEK' AS TYPE_DESC, 2 AS CLASS FROM DUAL 9 ) 10 -- END SAMPLE DATA 11 SELECT YEAR 12 , NVL(TO_CHAR(SUM(PEOPLE)),'-') AS PEOPLE 13 , NVL(TO_CHAR(SUM(ITEMS)),'-') AS ITEMS 14 , CLASS 15 FROM xTable 16 WHERE CLASS IN (1,2) 17 AND YEAR = 2010 18 GROUP BY YEAR 19 , CLASS 20 ORDER BY CLASS DESC; YEAR PEOPLE ITEMS CLASS -------------------- ------ ----- ----- 2010 - - 2 2010 8 7 1
-
Query result set...
I can't determine a good word in my question. So, I think that my pseudocode below will be sufficient for this purpose.
Oracle version: 11.2 g
Data set
The result of the above query:WITH temp AS ( SELECT 1 col1, 1 day FROM dual UNION ALL SELECT 2 col1, 1 day FROM dual UNION ALL SELECT 3 col1, 1 day FROM dual UNION ALL SELECT 4 col1, 1 day FROM dual UNION ALL SELECT 5 col1, 1 day FROM dual UNION ALL SELECT 6 col1, 1 day FROM dual UNION ALL SELECT 7 col1, 2 day FROM dual UNION ALL SELECT 8 col1, 2 day FROM dual UNION ALL SELECT 9 col1, 2 day FROM dual UNION ALL SELECT 10 col1,2 day FROM dual ) SELECT * FROM temp
You the WISH result set:COL1 DAY 1 1 2 1 3 1 4 1 5 1 6 1 7 2 8 2 9 2 10 2
I realize that I can get the desired result, set above the code below. However, for my I have several other data points and 100 separate days I need to do for their actual issue. In doing so, a statement of the UNION 100 isn't exactly going to work.DAY COL_TOTAL 1 21 2 55 -- 21 + 33 (the sum of day 1 + the sum of day 2)
Published by: user652714 on August 13, 2012 21:55WITH temp AS ( SELECT 1 col1, 1 day FROM dual UNION ALL SELECT 2 col1, 1 day FROM dual UNION ALL SELECT 3 col1, 1 day FROM dual UNION ALL SELECT 4 col1, 1 day FROM dual UNION ALL SELECT 5 col1, 1 day FROM dual UNION ALL SELECT 6 col1, 1 day FROM dual UNION ALL SELECT 7 col1, 2 day FROM dual UNION ALL SELECT 8 col1, 2 day FROM dual UNION ALL SELECT 9 col1, 2 day FROM dual UNION ALL SELECT 10 col1,2 day FROM dual ) SELECT SUM(col1) AS col_total FROM temp WHERE day <= 1 UNION ALL SELECT SUM(col1) AS col_total FROM temp WHERE day <= 2
Hello
I now see what you want. You can use this:
select * from tt order by col_1; COL_1 DAY ---------- ---------- 1 1 2 1 3 1 4 1 5 1 6 1 7 2 8 2 9 2 10 2 10 rows selected. select day, sum(total) over (order by day) COL_TOTAL from (select day, sum(col_1) TOTAL from tt group by day ); DAY COL_TOTAL ---------- ---------- 1 21 2 55 2 rows selected.
-
I made my largest site and how can keep the same size for all other sites?
I did the 2 larger site and how to keep the same size for all pages when I re - open the web browser?
You can use an extension to set a page zoom and the size of the default font on the web pages.
- Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
- NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/
-
How to dynamically access the SQLite result set?
I want to dynamically access the SQLite result set. Since webworks does not support the "PRAGMA table_info (table_name); I save all newly created information tables in a single two-column table called schema. schema has two columns, table_name, and column_name.
So I created a function to dynamically access the data in the table. I use the item = results.rows.item (i) and that the data access with item.column line.
column is a variable that will receive the value of a schema representative of column_name. When I alert (column) I get the column_name is correct, but when I used item.column my results are "not defined".
any advice on how to solve this issue.
I managed to solve this issue. The solution is the following: the normal way to access the data of the variable item = results.rows.item (i) is item.column (where the column is the name of the column in the database table. To access the data dynamically, I Specifies a var col1 to assign different values in col1. I then access the data in the database using point [col1] hope that makes sense. If you need a further explanation contact me at [email protected]
-
Need help to understand the query result
Hi gurus
I was reading one of the question here in this forum and its link is below:
I had some confusion related to this code and don't understand the logic of the out put, see query below:
Query
with sub_services as
(
Select su_seq 12323, 'HLR1' so_id, 1 seq Union double all the
Select su_seq 12323, "HLR2' so_id, seq 2 Union double all the
Select su_seq 12323, "A09" so_id, seq 3 of all the double union
Select su_seq 12333, "MO1" so_id, seq 4 Union double all the
Select su_seq 12333, "MO2' so_id, seq 5 Union double all the
Select su_seq 12333, "A09" so_id, 6 seq in union double all the
Select su_seq 12333, 'M0CR' so_id, seq 7 Union double all the
Select su_seq 12999, "LOL1' so_id, seq 8 Union double all the
Select su_seq 12999, "LOL2' so_id, seq 9 double
)
Select *.
of sub_services b
where exists (select 1 from sub_services
where su_seq = b.su_seq
and so_id = 'A09.
)
order by 2;
The query result
12323 A09 3
12333 6 A09
12323 HLR1 1
12323 HLR2 2
12333 M0CR 7
12333 4 MO1
12333 5 MO2
According to my understanding, the above query should return records in red only because of her is below command
It exists (select 1 from sub_services
where su_seq = b.su_seq
and so_id = 'A09.
but don't know why he's back 7 files, can someone help me understand the result...
It is query is functionally identical to the PL/SQL block, but much more effective.
declare
number of l_res;
Start
for line (select *)
sub_services) loop
Start
Select 1 from l_res
of sub_services
where su_seq = row.su_seq and
so_id = "A09" and
rownum = 1;
Essentially every row in the outer query are tested against him exists query. Given the correlation between two requests is based only on su_seq each line with a su_seq value returned by him is returned in the output.
Another way to think he uses instead a join condition. This query is equivalent to the query to exist
Select the main
of main sub_services
Join select (separate su_seq
of sub_services
where so_id = "A09") cond
We main.su_seq = cond.su_seq;
John
-
Hi all
I have this requirement to convert the JSON format in the result set (with the lines and columns).
is their in any case I can achieve this?
I was able to successfully convert the sql result set in JSON format but difficult time to do the reverse.
Flexibility:
At some point, I expect the lines to return no more than 2 & about 50 columns maximum.
Therefore, the JSON itself can be stored in varchar2 (4000) and not need to use CLOB. (If necessary to be passed as an argument to the function).
Oracle version: 11.2.0.3
Kind regards
AAG
There are at least the son on this site below:
https://community.Oracle.com/thread/2505918
https://community.Oracle.com/thread/3634280
-
new to 4.02, no grid or column names in the query results
It is a bit strange, I have SQL Developer 4.02 just installed, and I don't see grid or column names in the query results. Don't see anything useful in tools > Preferences, what don't get me?
The worksheet gives you a couple of different ways to run a query...
1. instruction execute sheet icon toolbar (large green arrow, or Ctrl + Enter).
This produces a results tab of the query with the data displayed in a grid.
2. worksheet icon toolbar Execute the Script (the small tip of the green arrow on lined paper, or F5).
This produces a tab out of the Script with the data displayed on the printer.
If execution of the statement to Execute the Script, using some SQL * most orders will remove the column headers:
1. set the position
2. set the pagesize 0 (or 1 or 2).
Pagesize and linesize default is - 1. By default, the spreadsheet is free for formatting output script as he wishes. If you have not changed these settings in the spreadsheet, then see if you point to a startup script in Tools > Preferences > Database > name of the connection startup script file
Kind regards
Gary
SQL DeveloperTeam
-
How to get SQL Developer 4.1 to display the query result?
SQL DEV 4.0.3.16.84 execution of a SELECT statement is stored in a .sql file causes the window of the query result of pop-up indicating the result of a SELECT statement. SQL DEV 4.1 is not to do so.
Oops on my part; my SQL formatting has been the root cause. I got used to insert split without any character of comment lines in front of them. For example:
==================================================
Select funny business;
The foregoing indicates the behavior described.
--==================================================
Select funny business;
With the dash double comment shows, the SQL works very well.
This is different than previous versions of SQL Developer, but is probably better functionality. I'll try to mark it as answered, but anyone with the admin should certainly do so if I can't.
-
I am a beginner using Muse. Google shows all pages menu in the search results and all texts on these pages. How to just display the home page?
Thank you. I thought I created my Muse wrong site.
-
How to clear the search query result set
I dropped a search with the table query. When I search a value it is the display of the result, but when I click on the reset button, only the query Panel is reset to zero and not the table. What can I do to reset the table component associated with the query?When I click on the reset button, only the query panel goes to zero and no table.
It will be reset nt table.
What can I do to reset the table component
Use of the component range reset. to do so.
http://jobinesh.blogspot.in/2009/10/reset-content-of-Web-page.html
http://myadfnotebook.blogspot.in/2011/05/making-reset-button-in-afquery.html trickles you want
http://andrejusb.blogspot.in/2009/09/programmatical-reset-for-query-results.html-edited lately
Published by: ADF7 on February 22, 2012 12:58 AM
-
Hi Experts,
I have a DB table has columns of more than 50.
I question this table, it should only return one line at any time. as sqldeveloper below image.
here, I need to build block pl/sql-query, Discover the column in the table as a key and query result as values.
Eg: Key - Value
TASK_EVENT_ID - 1765
EVENT_TYPE - ASR_UPDATE
... etc until all of the columns in my table.
Experts please comment on that point, appreciate your help on this.
Thank you
-Vincent.
Here is an approach using DBMS_SQL to iterate over the columns of key / value to assign... (Little code snipped for brevity)
create or replace procedure (task_expired)
v_store_id in full,
v_task_action_id in full,
v_job_id in full
)
as
-[SNIP code...]
v_sql VARCHAR2 (4000): = ' select * from my_table where PK = 123'; -Your SQL here!
v_v_val VARCHAR2 (4000);
v_n_val NUMBER;
v_d_val DATE;
v_ret NUMBER;
c NUMBER;
d NUMBER;
col_cnt INTEGER.
f BOOLEAN;
rec_tab DBMS_SQL. DESC_TAB;
col_num NUMBER;
vAsString VARCHAR2 (4000);
BEGIN
-[SNIP code...]
Message_properties. CORRELATION: = "EDF_EVENT";
MSG: = SYS. AQ$ _JMS_BYTES_MESSAGE. Construct();
Msg.set_string_property ('queueName', ' shipping/csi_cth');
Msg.set_string_property ('MODE', 'CR8');
c: = DBMS_SQL. OPEN_CURSOR;
DBMS_SQL. PARSE (c, v_sql, DBMS_SQL. NATIVE);
d: = DBMS_SQL. Execute (c);
DBMS_SQL. DESCRIBE_COLUMNS (c, col_cnt, rec_tab);
1.col_cnt J
LOOP
CASE rec_tab (j) .col_type
WHEN 2 THEN
DBMS_SQL. DEFINE_COLUMN (c, j, v_n_val); -Number
WHEN 12 CAN
DBMS_SQL. DEFINE_COLUMN (c, j, v_d_val); -Date
ON THE OTHER
DBMS_SQL. DEFINE_COLUMN (c, j, v_v_val, 2000); -Else treat as varchar2
END CASE;
END LOOP;
LOOP
v_ret: = DBMS_SQL. FETCH_ROWS (c);
WHEN OUTPUT v_ret = 0;
1.col_cnt J
LOOP
-Fetch each column to the correct data type based on coltype
CASE rec_tab (j) .col_type
WHEN 2 THEN
DBMS_SQL. COLUMN_VALUE (c, j, v_n_val);
vAsString: = to_char (v_n_val);
WHEN 12 CAN
DBMS_SQL. COLUMN_VALUE (c, j, v_d_val);
vAsString: = to_char (v_d_val, ' DD/MM/YYYY HH24:MI:SS');
ON THE OTHER
DBMS_SQL. COLUMN_VALUE (c, j, v_v_val);
vAsString: = v_v_val;
END CASE;
Msg.set_string_property (rec_tab (j) .col_name, vAsString);
END LOOP;
END LOOP;
DBMS_SQL. CLOSE_CURSOR (c);
DBMS_AQ. ENQUEUE (queue_name-online 'cbus.aqjms_common',
Enqueue_options => Enqueue_options,
Message_properties => Message_properties,
Payload-online msg,
Msgid => Message_handle);
dbms_output.put_line ('00 Msgid =' |) Message_handle);
dbms_output.put_line('===Done=');
-[SNIP code...]
END;
/
-
Unable to produce the query results
Hi all
Hello. I'm aunable write a query that can produce reuls froe below question. An account can have several part relationship.
Here is the data for the x table
PartyID - AcctNo - indicator - RoleCode
1111 ----- 123 ------ Y ------- 110
1112 ------- 123 ------ N --------- 120
1113 ------ 123 ------ N -------- 130
1114 ------- 124 ----- N -------- 100
1115 -------- 124 ------- N --------- 110
1116 --------- 124 ---- N --------- 100
1115 -------- 125 Y ------- 100
1116 ------- 125 N ------ 110
1117 ------- 126 Y ----- 100
Query should return these AcctNo is not any indicator = 'Y' and RoleCode did not have 100. In this case the results should be
AcctNo
123
124
Thanks in advance
Don
Hello
885137 wrote:
Hi, Frank, here is creation and insertion of table scripts. ...
Thank you.
So what's the problem with the query I posted in response #1? (You must use the correct name of the table, of course). Specify where he makes incorrect results and explain why these results are false.
-
How to keep the style of setting shaped tables that you paste IN when copying old pictures?
Hi all
I know that CMD-SHIFT-V works perfectly to keep the text styles you paste IN when you copy another block of text that contains different styles, but how do I do the same thing with a TABLE?
I have paintings from an InDesign document with a set of styles/table cell styles, etc and am copying into another InDesign document where I have tables that have table styles different styles/cell, etc. The only way I can successfully get the information in one table to another is to copy the information from the old table with the old styles and then paste it into an excel worksheet, and then copy the excel worksheet and paste into new tables in the new InDesign document.
Now, wouldn't that be so bad if I didn't have SO MANY hundreds and hundreds of paintings I was working with! I am currently working on a big catalogue and this workflow is slowing down a lot:)
Please note that I have deleted all styles (by removing all styles) tables I am pasting FROM, but chose to keep the formatting.
Once more, I bet that I I will kick myself when I see how the answer is easy!
Any help would be so appreciated!
Thank you kindly,
Christine
Try converting your old text table (column separator: tab; line separator: paragraph). Copy, select the style of lines and columns you want to paste the text in and paste without formatting in your new table. It may not work if your table is very complicated, but it worked for me on a test very simple.
Maybe you are looking for
-
Once upgraded to OSX EL Capitan with 10.11.15 any of my programs work. They all give the same error message that the program is damaged. It also happened when I tried the upgrade to 10.11.14. IM always in operating om 10.11.13
-
Buy Xbox live with the Visa gift card
I am buying a Xbox live for $9.99 a month with a gift of $25 (debit) visa card. I tried several times to buy it, but it keeps failing (I have enough money in the map) Help!
-
How can I find the games of hearts and solitaire that has disappeared from my XP PC?
4 or 5 years... all pre-installed games that came with my computer... just disappeared... probably because I am not a Curmudgeon and pushed the wrong buttons. I miss hearts and different solitaire games. Is there a free download Microsoft XP, which
-
There is no screen display once I installed an AGP graphics card
I have an AMD semprom computer, 2 GHz, 512 MB of RAM. I installed a new (5500 GFX) AGP video card to replace my onboard video. But then, when I started my computer it didn't display, the monitor will slow as. I followed the instructions given to m
-
switch lock to the Scanner 1815dn is STUCK
I work as a domestic support for my co-op student. We have a printer all-in-one dell 1815 and all that it is old, it works always for exactly what the Office needs Somehow in the morning, one of the employees accidentally locked the scanner. It's obv