w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Data insertion in Sql Table is taking too much time
Right now you are sending every insert one at a time. That's slow. If you can change the database, look up table valued parameters and pass a table to your function so you can send all the records just once. If you have direct access to a table, you can also use bulk copy.

Categories : Sql Server

Sencha Touch 2 - data sync to localstorage taking too much time
Directly save data in your local database spare table than load all data in store it will increase your app performance. for more detail click below link sencha touch Sync store Performance issue

Categories : Performance

Cursor to Retrieve Dataset for taking AVG and STDEV
WHILE @@FETCH_STATUS = 0 BEGIN SELECT TOP 100 r.[var] FROM RESULTS r WHERE r.[var] != 0 AND r.reqt_id = 4898 ORDER BY r.inst_id DESC FETCH NEXT FROM cursor_reqt_ids INTO @reqt_id --include this line so you can retrive next records and casuse the loop to terminate END Your loop going to infinite loop because you didnt fetch data inside your while loop so you @@FETCH_STATUS never become 1 to terminate the loop.

Categories : SQL

PHP foreach loop is taking time to load thousands of table data in Google Chrome
It may not be the foreach loop that is slow, 8500 is good number of data to load, you might want to page the results. Why don't you try the same query using phpmyadmin and see the time taken.

Categories : PHP

Improve page rendering time having gridview, child gridview and grand child gridview on it
You are creating way too many grids. A grid is an expensive component. You could alter your user interface to allow users to select an Item and bind the inner grid only on selection. This ensures that rather than one grid per row or parent grid, you will have only one child grid displayed at a time.

Categories : C#

How to format time(0) SQL data field as AM/PM using GridView DataFormatString property
As @JozefBenikovský pointed out in the comments, you have to use the TimeSpan format strings. This requires you to escape the : field in the format string (or whatever character you use as the separator). Note that the TimeSpan DOES NOT have an AM/PM designator format field string. To have the AM/PM designator, you will need to cast your SQL Server Time type to a DataTime and then apply the standard DateTime format strings. The sample below illustrates both concepts: <div> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString %>" SelectCommand="SELECT ProductId, StoreTime, cast(StoreTime as DateTime) as StoreTimeAsDateTime FROM junk.dbo.[Product]"> </asp:SqlDataSource

Categories : C#

GridView not taking DDL.SelectedValue
I can't see in your code where you have created an event handler for databind. I've taken some examples from MSDN, to show the steps you need. Function CreateDataSource() As ICollection 'put your data source in here End Function 'CreateDataSource 'Declaration Public Event ItemDataBound As DataGridItemEventHandler Sub Item_Bound(sender As Object, e As DataGridItemEventArgs) Label1.Text = Label1.Text & " " & e.Item.ItemIndex End Sub 'Item_Bound Sub Page_Load(sender As Object, e As EventArgs) ' Manually register the event-handling method for the ' ItemDataBound event of the DataGrid control. AddHandler ItemsGrid.ItemDataBound, AddressOf Item_Bound ' Load sample data only once, when the page is first loaded. If Not IsPostBack Then

Categories : Asp Net

Display Dataset in gridview ( C# windows application)
Does xmlResponse in your code represent dataset? Please try this code - I used the dataset and it works. DataSet ds = new DataSet(); ds.ReadXml(strFileName); // strFileName is XML File path dataGridView1.DataSource = ds.Tables[0];

Categories : C#

Optimizing JQuery Datatables - working with large dataset while taking more than 30 minutes for processing in the middle layer (JAVA)
You can use DataTables server side processing option. ...and if you are working with seriously large databases, you might want to consider using the server-side options that DataTables provides. Basically all of the paging, filtering, sorting etc that DataTables does can be handed off to a server (or any other data source - Google Gears or Adobe Air for example!) and DataTables is just an events and display module. It will fetch only few records and will display it to the user, rest of the records are only fetched when required like when user clicks on next/previous,

Categories : Java

Sorting a GridView Bound to a Dataset, DataTable null on cast?
its hard to find from the code snippet why it is NULL, as per my knowledge but i can give u idea, at the time you bind your data table gridview, put the data table in view state or in session better to put in viewstate, and then retrieve data table at the time of sorting

Categories : C#

Width of Column Of dataset appent to GridView Not Changing Asp.net My Code Attached?
Set the width for each column in aspx page. e.g <HeaderStyle HorizontalAlign="Left" Width="50px" ></HeaderStyle> <ItemStyle HorizontalAlign="Left" Width="50px"></ItemStyle> <asp:BoundField HeaderText="abc" HeaderStyle-Width="120px" ControlStyle-Font-Bold="true" ControlStyle-CssClass="MyText" DataField="BrandName"> <ControlStyle CssClass="MyText" Font-Bold="True"></ControlStyle> </asp:BoundField>

Categories : C#

C# SerialPort.Write is taking a long time to write data
The baud rate is bits per second, not bytes per second. 420 bytes is 3360 bits, so the raw data takes 3360/9600 = 0.35 seconds to send. So, 400 ms seems very reasonable when the overhead is included.

Categories : C#

Xcode Instruments Time Profiler Understanding which methods are taking the most time
Toogle Display of Primary Views and select: Separated by Thread Invert Call Tree Hide System Libraries Show Obj-C Only Try to see this: http://www.raywenderlich.com/23037/how-to-use-instruments-in-xcode

Categories : Xcode

php convert local time to utc time taking into consideration Daylight savings
You can get UTC time with gmdate: http://php.net/manual/en/function.gmdate.php Also you can change your timezone to UTC: date_default_timezone_set('UTC');

Categories : PHP

display gridview data in another page or other gridview with row data in editable mode
You need to add RowCommand Event in GridView. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand"> <asp:LinkButton ID ="lnkEdit" runat ="server" CommandArgument='<%#Eval("Recordid")%>' CommandName ="cmdEdit" Text ='Edit'></asp:LinkButton> </asp:GridView> Here rocordid is the id of your record. In Page behind you need to write code. protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "cmdEdit") { string Recordid = Convert.ToString(e.CommandArgument.ToString()); Response.Redirect("EditPage.aspx?recordid="+Recordid ); } } On EditPage you can get recordid from the query string and can fetch the record form the datab

Categories : Asp Net

Gridview returning empty even when there is data. I want to use data in the gridview to update another database
Per my comment above you may want to do something like: List<string> _OrderIds = new List<string>(); DataTable table = gvOrderLines.DataSource as DataTable; foreach (GridViewRow gvr in table.Rows) { Label myOrderIDLablel = (Label)gvr.FindControl("lblOrderID"); //find control since it is a template field _OrderIds.Add(myOrderIDLablel.Text); } I hope this get you headed in the right direction.

Categories : C#

Gridview onRowCommand fired gridview no data
Problem in this line ID = gvWorkshop.DataKeys[grdrow.RowIndex]["workshopID"].ToString(); You have mention "grdrow" in place of "row". please change it to ID = gvWorkshop.DataKeys[row.RowIndex]["workshopID"].ToString();

Categories : C#

Query is taking too much time
You have to put OR condition in brackets: SELECT a.expense_code, a.expense_date, a.expense_supplier_code, b.supplier_name, a.expense_discount, a.expense_payment_method, a.expense_payment_transfer_to, a.expense_advance, a.expense_status, SUM(c.expense_item_buy_price * c.expense_item_quantity), d.account_name, a.expense_counter, a.expense_type, a.expense_saving_type, a.expense_payment_transfer_from FROM expense_data a, supplier_data b, expense_item c, tree_data d WHERE a.expense_supplier_code = b.supplier_code AND a.expense_payment_transfer_to = d.account_code AND a.expense_counter = c.expense_counter AND a.expense_date BETWEEN '2013-01-01' AND '2014-01-01' AND (a.expense_status = 0 OR a.expense_status = 2

Categories : Mysql

UIScrollView taking too much time
Is there any way to show the app and the scrollView while records are loading ? Try to use [self performSelector:@selector(loadIt) withObject:nil]; or [self performSelector:@selector(loadIt) withObject:nil afterDelay:0.2]; It will not block your UI until the execution of this method. You are loading lots of records. Actually you should not load all records at at time. You should use mechanism something like tableview is using i.e.load only those record which are in visible area of scrollview. Don't load new rows until the scroll and you should reuse row or views so speedup the scrolling.

Categories : IOS

Strongly typed dataset Playing up big time
It might be that it's returning 1 for the inserted record due to not having SET NOCOUNT ON; in the SP. Try adding this, it should solve the issue. Not having this will give you the amount of affected records, 1 in your case. USE [DataBaseName] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE procedure [dbo].[InsertRecord] ( @a int, @b int ) AS SET NOCOUNT ON; INSERT Into tableName Values ( @a, @b ) return SCOPE_IDENTITY()

Categories : C#

Mysql connection taking too much time
Use this sentence log-slow-queries=/var/log/mysql/log-slow-queries.log instead of slow-query-log-file=/var/log/mysql/log-slow-queries.log i think this is the problem you are not seeing anything in log file Ensure you have the file touch /var/log/mysql/log-slow-queries.log chown mysql.mysql -R /var/log/mysql I get this ideas from here: http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html, so take a look to see something useful

Categories : Mysql

Merging two images taking too much time
Some ideas: Cache the results (if images are reused with same parameters) Perform merges concurrently Reuse the context (create the context using CGBitmapContextCreate instead of UIGraphicsBeginImageContext) Set the interpolation quality to a lesser value: CGContextSetInterpolationQuality(context, kCGInterpolationNone) There are some more potential optimizations but they depend on the type of image (alpha, size, type, ...).

Categories : Iphone

SQL Query taking a long time
Try with NOT EXISTS clause: SELECT DISTINCT t.class_name, t.class_code, @UTCTimeNow, @Username FROM tblimport_n t WHERE NOT EXISTS (SELECT 'X' FROM classmaster_n cm WHERE t.class_code = cm.classcode) Because your LEFT JOIN with WHERE condition on classcode is null is the same thing

Categories : Mysql

Taking lot of time to read from SQL Server using c#
Something like this might work. I'm not sure on the efficiency yet - it may depend on the amount of hits that you're looking for: create type HitBlocks as table ( HitIndex int not null ) go create procedure FindMaxCover @Hits HitBlocks readonly as ;With DecomposedBlocks as ( select (HitIndex/8)+1 as ByteIndex,POWER(2,(HitIndex%8)) as BitMask from @Hits ), Coverage as ( select t.TraceName,SUM(CASE WHEN SUBSTRING(t.BlockVector,db.ByteIndex,1) & BitMask != 0 THEN 1 ELSE 0 END) as Coverage from Trace t cross join DecomposedBlocks db group by t.TraceName ), Ranked as ( select *,RANK() OVER (ORDER BY Coverage desc) as rk from Coverage ) select

Categories : C#

WebSphere on AIX not taking system time
The answer is to first make Time Machine aware of the JRE that comes with WAS as this is not done automatically. This is done with the tminstall command: tminstall -j <path to JVM directory> Once done, it is possible to manipulate the WAS time using the tmuser command. For example tmuser -a -u wasuser -x 122323592015 to set the time to almost midnight, the night before Christmas 2015.

Categories : Misc

Saving to Database taking too much time
With default NHibernate settings, every time you query NHibernate will check if the session contains any changes that might affect the outcome of the query. So as the number of objects active in the session grows, if you do repeated querying, performance will drop. Avoid doing queries in a loop. It's better to query for multiple objects earlier. Furthermore, you appear to be loading an object by primary key, for which you should use session.Get(id) instead. It is much faster, since it will bypass the dirty-checking mentioned above, and also look in the session's first-level cache first. But like others said, you appear to be deleting and object and then immediately putting it back - i.e. it should normally be an update instead of delete+insert.

Categories : C#

SvnRevisionRange not taking time correctly
Just to clarify the question-- you're saying that the time properties of the SvnRevisionRange object are inconsistent with the values originally passed in? If so, this test would fail: DateTime startDateTime = DateTime.UtcNow.AddDays(-1); DateTime endDateTime = DateTime.UtcNow; SvnRevisionRange range = new SvnRevisionRange(new SvnRevision(startDateTime), new SvnRevision(endDateTime)); Assert.AreEqual(startDateTime, range.StartRevision.Time, "The start times are not equal"); Assert.AreEqual(endDateTime, range.EndRevision.Time, "The end times are not equal"); Run the code above as a unit test and post the results...

Categories : Misc

Oracle count (*) is taking too much time
Counting the number of rows of large table takes long time. It's natural. Some DBMS stores the number of records, however, this kinds of DBMS limits concurrency. It should lock the entire table before DML operation on the table. (The entire table lock is necessary to update the count properly.) The value in ALL_TABLES.NUM_ROWS (or USER_TABLES.NUM_ROWS) is just a statistical information generated by analyze table ... or dbms_stats.gather_table_stats procedure. It's not accurate, not real-time information. If you don't need the exact number of rows, you can use the statistical information. However you shouldn't depend on it. It's used by Oracle optimizer, but shouldn't in application program. I'm not sure why you have to count the number of rows of the table. If you need it in the batch

Categories : SQL

taking too much time for large numbers
There are no effective algorithms for factorization of big numbers. While probably not the answer you have expected, please take a look at wikipedia: http://en.wikipedia.org/wiki/Integer_factorization

Categories : C

Taking a long time to close fstream
The writes were likely buffered. The close is causing it to flush, so you must wait for it to be written to disk first. Try putting a flush in your for loop and then see if the close takes a long time or not. fstream *writeReadStream = new fstream("/home/username/Desktop/file.bin", fstream::in | fstream::out | fstream::binary); writeReadStream->seekg(0x100000); char randomData[0x100000]; for (int i = 0; i < 0x270; i++) { writeReadStream->write(randomData, 0x100000); writeReadStream->flush(); } writeReadStream->close(); delete writeReadStream;

Categories : C++

jQuery load() taking a long time
When I switch to JQuery 1.9, I get this message in your fiddle: XMLHttpRequest cannot load http://www.google.nl/. Origin http://fiddle.jshell.net is not allowed by Access-Control-Allow-Origin. For some reason JQuery 1.10 doesn't generate this message, but the problem I think is the same: You've run into a (the) same origin policy which doesn't allow you to do AJAX requests to other domains. At least, this is the problem in your fiddle. It doesn't explain why you do get results on your local machine. There, you probably did use the same local machine in the AJAX request as well. In that case you're not bothered by the policy. The reason of slowing down? Who can tell. Maybe... the server requests takes a long time (slow PHP script) you got other processes running that take up

Categories : Jquery

Sql query taking long time with inner join
Try this: SELECT v.LinkID, r.SourcePort, r.DestPort, r.NoOfBytes, r.StartTime , r.EndTime, r.Direction, r.nFlows FROM LINK_TBL v INNER JOIN NODEIF_TBL n ON n.NodeNumber=v.orinodenumber INNER JOIN RAW_TBL r ON r.RouterIP=n.ifipaddress and v.oriIfIndex=r.OriIfIndex;

Categories : Mysql

SSRS Report is taking too much time while rendering
Try rendering it in a different web browser. I'm assuming you are talking about when it is deployed to the server? Also, sometimes there is an issue with the grouping of the data. So you might want to play around with the keep together and pagebreak options, for the report under the tablix member properties.

Categories : SQL

Viewholder taking too much time to load for Listview
You need to populate your text views outside of the if else statement. The ones in the middle are being caught by the first case and the properties are not filled. public View getView(final int position, View convertView,final ViewGroup parent) { View rowview = convertView; ViewHolder viewholder; if (rowview == null) { viewholder = new ViewHolder(); final LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); rowview = inflater.inflate(R.layout.list_skeleton_people_expenses, parent, false); viewholder.tv1 = (TextView)rowview.findViewById(R.id.name); viewholder.tv2 = (TextView)rowview.findViewById(R.id.destination); viewholder.tv3 = (TextView)rowview.findViewById(R.id.start);

Categories : Android

Posting a tweet with TweetSharp in C# is taking much time
If you are using .NET 4.5 to run something in a new thread you do this // this is a better way to run something in the background // this queues up a task on a background threadpool await Task.Run(() => { twitterService.SendTweet(new SendTweetOptions { Status = status }); }); // this method of running a task in the background creates unnecessary overhead Task.Factory.StartNew(() => { twitterService.SendTweet(new SendTweetOptions { Status = status }); });

Categories : C#

How can I find in Oracle which queries are taking most of CPU time?
Sounds like you need to generate some SQL trace files and analyse the results using tkprof. There's a good Ask Tom question here that should show you how to go about this: http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:969160000346108326

Categories : Oracle

AngularJS render taking long time
try to use bindonce to decrease the numbre of watchers, that will increase highly the page performance, especially when there is a huge amount of items to render

Categories : Javascript

Magento Indexing taking so much time to complete
" Is there is any way that i can perform indexing on those products ?" If you run this from the browser and get some 50x errors (usually PHP has different timeouts for web and cli) then you can run the indexer from command line (check php.ini first for an optimal Magento configuration - memory and no timeout): php shell/indexer.php help The indexer on Magento takes a long time, depending on the number of Products and Store Views you have (Attributes, Categories... but mainly the two above). If you use the Enterprise version of Magento you have a SOLR module that can be used for search and layered navigation (usually faster than MySQL). In the latest Enterprise version some tweaks were made to avoid certain bugs, so maybe using 13.0.1 will help you. Also having good hardware helps a lot (

Categories : Performance

ALTER COLUMN query taking too much time
I have tried the same query in my machine. It's working fine for me. Restart the Sql server services and then execute that code. Or Try to change it through query design using ssms tool.

Categories : Sql Server

Query taking very long the first time it runs
What is probably happening is that the extra time the first time the query runs is spent compiling the query and developing the execution plan. This stays cached for awhile and then it happens again. The solution is to put your query into a stored procedure.

Categories : Mysql



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.