My function running query, its taking sometime depending on requested data. While query running, I want to show real query loading cfprogressbar & changing status/title while cfprogressbar doing progress. im still searching on google till now no luck all examples showing static time.
I was thinking if i can get real cfquery loading time & i'll pass that value to cfprogressbar. Please advise
coldfusion 11
windows 2012
cfprogressbar
cfquery
Unfortunately you can't show an accurate progress bar. The ColdFusion engine does not run your query, the database server runs your query and for that reason the ColdFusion engine does not know where your db server is at while running the query. You can show a 'spinner' if you want to let your user know that something is going on.
Related
Django "caches" my query. I realized it after updating my Database. When i run the Function with the Query, it takes some old Data before the Update. When i restart the Server, it works fine again.
Do anyone know, how i can solve this issue?
I use Raw Queries with the connection-function. (connection.cursor(sql)). In the End of each Query, i close the cursor with cursor.close().
I debugged the Code and found out, that after Updating my Database it takes the old Data until i restart my Server.
I have a Django application, and it works fine. So far, the connection to Oracle seems to be ok. The problems is when I try to query data. I use the objects property and it gives me
"ORA-00933: SQL command not properly ended"
error. So far I ven looking the query and I think is the problem. Anyway, I try that same query on oracle and sems to be pk
print(CONTRIBUYENTES.objects.using('VIALISDB').all().query)
SELECT "FGESILDOWN.SILD_DET_CONTRIBUYENTES"."DTCO_FOLIOSOLICITUD" FROM "FGESILDOWN.SILD_DET_CONTRIBUYENTES"
Does someone knows the problem?
The query returns only 4-5 rows. It takes less than 1 second to execute. I have trid increasing the timeout of both cfquery and cfsetting but not working. most of the time code runs successfully but i got this error after every 20-30 request. I am using sql server database. I know when you restart the cf server or db server timeout issue occurs sometimes but this error is comming without restarting of any service (cf or sql server). I think there should be some setting changes in cf server please suggest.
The request has exceeded the allowable time limit Tag: CFQUERY
The error occurred on line 180.
<CFQUERY NAME="Sections" DATASOURCE="abcd">
SELECT * FROM News_Sections where Section = 'Home' ORDER BY Page_order
</CFQUERY>
The likely problem here is going to be the database not ColdFusion. I have a couple of tips for you. First, using the MSSQL Activity Monitor check out blocks (as a wait type). If you see a block or a "head blocker" click on that item and it will show you the query (sometimes :).
Once you locate it, fixing the problem will involve indexing or changing the query (complex joins or sub-queries often have unexpected consequences).
You might have some luck using "WITH(nolock)" in the above query to allow for a dirty read (probably ok if you are just getting categories). You might also consider caching the above query using cachedwithin or placing it in the application scope. If it is just broad "home" categories that seems reasonable to me (though obviously I don't know your schema.
My final bit of advice is to examine the page on which the error takes place closely. Sometimes the line number is off a bit. If you have groups of queries together it may not be the query you think is erroring out but the one above it. It's not common but it can happen.
As was pointed out by Mr. Bracuk, this may not be a problem with your query. This error has to do with the setting in the CFAdmin for Request timeouts. It is the page that is loading that has experienced the timeout and thrown the error. When the timeout occurred it just happened to be processing your query.
So, while the query is a good place to start looking, make sure to examine the entire script when searching for the cause of the timeout.
I want to track how much time needed for my queries to be executed
I referred to this post but I get only the queries without the time.
It is possible that after using my web application for a wile,using select, update , insert queries (not from console but real web-application execution) I can get a summary like this output generated by SHOW PROFILES; command.
I am working with wamp mysql V5.5.24
Many thanks
Edit: I used triggers to track the update and insert statement following this method
I still have the problem how to track the select query.
any idea please?
This no longer works.
As of July 2013, you need:
general-log=1
general-log-file = "C:\wamp\logs\mysql_general.log"
Are you sure you are not getting execution times in your slow query log?
If you are just looking to optimize your queries (rather than checking the execution time of every single one), you can look at the mysql server status in phpmyadmin (assuming you kept it in your wamp server) as covered here. The full tutorial is paid, but the preview will get you into the server status page where phpmyadmin will point out problem areas for you.
Finaly I used the general log by setup WAMP server like this
[mysqld]
port=3306
long_query_time = 1
slow_query_log = 1
slow_query_log_file = "E:/wamp/logs/slowquery.log"
log = "E:/wamp/logs/genquery.log"
after that I used this tool (trial version) dbForge Studio where I can use a query profiler and I get the complete execution time.
When I execute getDefault() on a java.util.TimeZone object created from ColdFusion 9 I am getting "Pakistan Time". We are in the eastern timezone and our server (Windows 2003) is reporting proper timezone. Where would ColdFusions JVM be getting this timezone?
TimeZone: Pakistan Time (Asia/Karachi)
try this: http://troymurray.blogspot.com/2007/12/coldfusion-timezone-change.html(deleted)
Content retrieved from Google's cache:
ColdFusion Timezone Change
So I've been working on a component to accept data from whatever and insert it into our Oracle database, no big deal. But, I need to do this with date and times, which gets really sticky with Oracle. I noticed however that my ColdFusion function Now() was returning the wrong time, about 5 hours off, which corresponds to my timezone (-5).
I looked all through the ColdFusion Admin but wasn't able to find anywhere to specify this. I then seem to remember that when I setup this server, and installed ColdFusion on it, that I had the wrong timezone set and somehow that must have been saved. Since ColdFusion relies on Java I needed to change the time zone with the Java Virtual Machine (JVM) that ColdFusion runs. Here is how I did it:
First, find the correct timezone ID for your location. I found mine by going here.
Login to the ColdFusion Admin
Under Server Settings go to Java and JVM
Locate the JVM Arguments textarea
Add a space after the last character, then "-Duser.timezone=" and then your timezone ID.
Click the "Submit Changes" button
Restart the "ColdFusion 8 Application Server" service
Verify your time shows correctly now.