Search Results

Search found 671 results on 27 pages for 'optimizing'.

Page 19/27 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • PHP: How to use mysql fulltext search and handle fulltext search result

    - by garcon1986
    Hello, I have tried to use mysql fulltext search in my intranet. I wanted to use it to search in multiple tables, and get the independant results depending on tables in the result page. This is what i did for searching. $query = " SELECT * FROM testtable t1, testtable2 t2, testtable3 t3 WHERE match(t1.firstName, t1.lastName, t1.details) against(' ".$value."') or match(t2.others, t2.information, t2.details) against(' ".$value."') or match(t3.other, t2.info, t2.details) against(' ".$value."') "; $result = mysql_query($query)or die('query error'.mysql_error()); while($row = mysql_fetch_assoc($result)){ echo $row['firstName']; echo $row['lastName']; echo $row['details'].'<br />'; } Do you have any ideas about optimizing the query and format the output of search results?

    Read the article

  • What Simple Changes Made the Biggest Improvements to Your Delphi Programs

    - by lkessler
    I have a Delphi 2009 program that handles a lot of data and needs to be as fast as possible and not use too much memory. What small simple changes have you made to your Delphi code that had the biggest impact on the performance of you program by noticeably reducing execution time or memory use? Thanks everyone for all your answers. Many great tips. For completeness, I'll post a few important articles on Delphi optimization that I found. Before you start optimizing Delphi code at About.com Speed and Size: Top 10 Tricks also at About.com Code Optimization Fundamentals and Delphi Optimization Guidelines at High Performance Delphi, relating to Delphi 7 but still very pertinent.

    Read the article

  • When is performance gain significant enough to implement that optimization?

    - by Zwei steinen
    Hi, following the text book, I do measure performance whenever I try optimizing my code. Sometimes, however, the performance gain is rather small and I can't decisively decide whether I should implement that optimization. For example, when a fix shortens an average response time of 100ms to 90ms under some conditions, should I implement that fix? What if it shortens 200ms to 190ms? How many condition should I try before I can conclude that it will be beneficial overall? I guess it's not possible to give a straight forward answer to this, as it depends on too many things, but is there a good rule of thumb that I should follow? Are there any guideline/best-practices?

    Read the article

  • MySQL - How To Avoid Repair With Keycache?

    - by dvancouver
    I have had some experience with optimizing the my.cnf file but my database has around 4 million records (MyISAM). I am trying to restore from a mysqldump but every time I do I eventually get the dreaded "Repair With Keycache", that may take days. Is there anyway to get past this and let it roll as "Repair By Sorting"? I have 2GB RAM, Dual Cores, lots of extra hard-drive space. Snip out of my.cnf: set-variable = max_connections=650 set-variable = key_buffer=256M set-variable = myisam_sort_buffer_size=64M set-variable = join_buffer=1M set-variable = record_buffer=1M set-variable = sort_buffer_size=2M set-variable = read_buffer_size=2M set-variable = query_cache_size=32M set-variable = table_cache=1024 set-variable = thread_cache_size=256 set-variable = wait_timeout=7200 set-variable = connect_timeout=10 set-variable = max_allowed_packet=16M set-variable = max_connect_errors=10 set-variable = thread_concurrency=8

    Read the article

  • Optimize grep, awk and sed shell stuff

    - by kockiren
    I try to sum the traffic of diffrent ports in the logfiles from "IPCop" so i write and command for my shell, but i think its possible to optimize the command. First a Line from my Logfile: 01/00:03:16 kernel INPUT IN=eth1 OUT= MAC=xxx SRC=xxx DST=xxx LEN=40 TOS=0x00 PREC=0x00 TTL=98 ID=256 PROTO=TCP SPT=47438 DPT=1433 WINDOW=16384 RES=0x00 SYN URGP=0 Now i grep with following Command the sum of all lengths who contains port 1433 grep 1433 log.dat|awk '{for(i=1;i<=10;i++)if($i ~ /LEN/)print $i};'|sed 's/LEN=//g;'|awk '{sum+=$1}END{print sum}' The for loop i need because the LEN-col is not on same position at all time. Any suggestion for optimizing this command? Regards Rene

    Read the article

  • static arrays defined with unspecified size, empty brackets?

    - by ahmadabdolkader
    For the C++ code fragment below: class Foo { int a[]; // no error }; int a[]; // error: storage size of 'a' isn't known void bar() { int a[]; // error: storage size of 'a' isn't known } why isn't the member variable causing an error too? and what is the meaning of this member variable? I'm using gcc version 3.4.5 (mingw-vista special) through CodeBlocks 8.02. On Visual Studio Express 2008 - Microsoft(R) C/C++ Optimizing Compiler 15.00.30729.01 for 80x86, I got the following messages: class Foo { int a[]; // warning C4200: nonstandard extension used : zero-sized array in struct/union - Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array }; int a[]; void bar() { int a[]; // error C2133: 'a' : unknown size } Now, this needs some explaination too.

    Read the article

  • SQLite.Net Issue With BeginTransaction

    - by cam
    I'm trying to use System.Data.Sqlite library, and I'm following the documentation about optimizing inserts so I copied this code directly out of the documentation: using (SQLiteTransaction mytransaction = myconnection.BeginTransaction()) { using (SQLiteCommand mycommand = new SQLiteCommand(myconnection)) { SQLiteParameter myparam = new SQLiteParameter(); int n; mycommand.CommandText = "INSERT INTO [MyTable] ([MyId]) VALUES(?)"; mycommand.Parameters.Add(myparam); for (n = 0; n < 100000; n ++) { myparam.Value = n + 1; mycommand.ExecuteNonQuery(); } } mytransaction.Commit(); } Now, I initialize I connection right before that by using SqlConnection myconnection = new SqlConnection("Data Source=blah"); I have a Database named blah, with the correct tables and values. The problem is when I run this code, it says "Operation is not valid due to the current state of the object" I've tried changing the code around several times, and it still points to BeginTransaction. What gives?

    Read the article

  • Asp.net Website Performance Improvement Checklist

    - by Jordon
    Hello Friends, I have asp.net website name http://www.go4sharepoint.com I have tried almost all ways to improve performance of this site, I have even check firebug and page speed addon on Firefox, but somehow i am not pleased with the result. I also tried like removing whitespace, remove viewstate, optimizing code which renders it, applied GZip, I have also no heavy session variables used, but still when i compare with other popular websites it is not upto the mark. I have check CodeProject website and was surprise that even though they have lot of stuff displayed there website is loading fast and they also have good loading rate. To all experts, Please suggest me where i am going wrong in my development. Thank you.

    Read the article

  • How do I inhibit "note C6311" in Microsoft C compiler?

    - by piCookie
    In this maximally clipped source example, the manifest constant FOOBAR is being redefined. This is deliberate, and there is extra code in the live case to make use of each definition. The pragma was added to get rid of a warning message, but then a note appeared, and I don't seem to find a way to get rid of the note. I've been able to modify this particular source to #undef between the #define, but I would like to know if there's a way to inhibit the note without requiring #undef, since there are multiple constants being handled the same way. #pragma warning( disable : 4005 ) // 'identifier' : macro redefinition #define FOOBAR FOO #define FOOBAR BAR The compiler banner and output are as follows Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved. message.c message.c(3) : note C6311: message.c(2) : see previous definition of 'FOOBAR'

    Read the article

  • Javascript + Firebug : "cannot access optimized closure" What does it mean?

    - by interstar
    I just got the following error in a piece of javascript (in Firefox 3.5, with Firebug running) cannot access optimized closure I know, superficially, what caused the error. I had a line options.length() instead of options.length Fixing this bug, made the message go away. But I'm curious. What does this mean? What is an optimized closure? Is optimizing an enclosure something that the javascript interpretter does automatically? What does it do?

    Read the article

  • Sending SMTP e-mail at a high rate in .NET

    - by Martin Liversage
    I have a .NET service that processes a queue on a background thread and from the items in the queue sends out a large number of small e-mail messages at a very high rate (say 100 messages per second if that is even possible). Currently, I use SmtpClient.Send() but I'm afraid that it may hamper performance. Each call to Send() goes through a full cycle of opening the socket, performing the SMTP conversation (HELO, MAIL FROM, RCPT TO, DATA) and closing the socket. In pseudo code: for each message { open socket send HELO send MAIL FROM send RCPT TO send DATA close socket } I would think that the following pseudo code would be more optimal: open socket send HELO for each message { send MAIL FROM send RCPT TO send DATA } send QUIT close socket Should I be concerned about the performance of SmtpClient.Send() when sending e-mail at a high rate? What are my options for optimizing the performance?

    Read the article

  • Genetic programming in c++, library suggestions?

    - by shuttle87
    I'm looking to add some genetic algorithms to an Operations research project I have been involved in. Currently we have a program that aids in optimizing some scheduling and we want to add in some heuristics in the form of genetic algorithms. Are there any good libraries for generic genetic programming/algorithms in c++? Or would you recommend I just code my own? I should add that while I am not new to c++ I am fairly new to doing this sort of mathematical optimization work in c++ as the group I worked with previously had tended to use a proprietary optimization package. We have a fitness function that is fairly computationally intensive to evaluate and we have a cluster to run this on so parallelized code is highly desirable. So is c++ a good language for this? If not please recommend some other ones as I am willing to learn another language if it makes life easier. thanks!

    Read the article

  • Why does Printing from Javascript in Air happen out of order?

    - by Bob Bob
    I am trying to print from an Adobe Air App that embeds an AJAX app. The print function looks like this: function printPage() { asyncSetupForPrint(printCallback); } function asyncSetupForPrint(printCallback) { synchronousMethods(); if (printCallback) printCallback(); } function printCallback() { var pjob = new window.runtime.flash.printing.PrintJob; var psprite = window.htmlLoader; pjob.start(); // etc... } However the print dialog is coming up before the synchronous methods have been executed. Is the AIR JS runtime optimizing something? And if so, is there any way to stop it doing that? (The setup function is doing things like changing the resolution to huge*huge so that the print out looks ok.)

    Read the article

  • How do I use compiler intrinsic __fmul_?

    - by Eric Thoma
    I am writing a massively parallel GPU application. I have been optimizing it by hand. I received a 20% performance increase with _fdividef(x, y), and according to The Cuda C Programming Guide (section C.2.1), using similar functions for multiplication and adding is also beneficial. The function is stated as this: "_fmulrn,rz,ru,rd". __fdividef(x,y) was not stated with the arguments in brackets. I was wondering, what are those brackets? If I run the simple code: int t = __fmul_(5,4); I a compiler error about how _fmul is undefined. I have the CUDA runtime included, so I don't think it is a setup thing; rather it is something to do with those square brackets. How do I correctly use this function? Thank you.

    Read the article

  • Display another field in the referenced table for multiple columns with performance issues in mind

    - by israkir
    I have a table of edge like this: ------------------------------- | id | arg1 | relation | arg2 | ------------------------------- | 1 | 1 | 3 | 4 | ------------------------------- | 2 | 2 | 6 | 5 | ------------------------------- where arg1, relation and arg2 reference to the ids of objects in another object table: -------------------- | id | object_name | -------------------- | 1 | book | -------------------- | 2 | pen | -------------------- | 3 | on | -------------------- | 4 | table | -------------------- | 5 | bag | -------------------- | 6 | in | -------------------- What I want to do is that, considering performance issues (a very big table more than 50 million of entries) display the object_name for each edge entry rather than id such as: --------------------------- | arg1 | relation | arg2 | --------------------------- | book | on | table | --------------------------- | pen | in | bag | --------------------------- What is the best select query to do this? Also, I am open to suggestions for optimizing the query - adding more index on the tables etc... EDIT: Based on the comments below: 1) @Craig Ringer: PostgreSQL version: 8.4.13 and only index is id for both tables. 2) @andrefsp: edge is almost x2 times bigger than object.

    Read the article

  • Pros and cons of keeping metadata in image thumbnails

    - by SODA
    I am working on optimizing site load speed for a few moderately high traffic sites. Some quick observations show that creating 40 picture thumbnails (e.g. 138x138 JPG @75% quality) results in 700 Kb total size with embedded metadata and 258 Kb with stripped metadata. Which means that roughly 60% of image size is metadata. So what would be pros and cons of removing metadata from thumbnails? Are there any regulations, e.g. you must keep author info / copyright info in the images? Any insights would be appreciated.

    Read the article

  • Seeking free ODBC database optimization tool for non-experts

    - by mawg
    I'm a database n00b and am reading as many books as I can. I have been given responsibility for an ODBC tool where the databases were designed by a hardware engineer with some VB experience - which made him a s/w guru in the small firm at that time. Things are running slowly and I suspect that the db could have been designed better. I hope to learn enough to use Explain/Describe, etc maybe add some indices, but, in the meantime, is there any free for commercial use tool which can examine an ODBC database and suggest improvements. I'm just talking about db schema here, but maybe I should also be looking at optimizing Selects with Joins? Is there a tool for that? ODBC compliant.

    Read the article

  • web page db query optimisation

    - by morpheous
    I am putting together a web page which is quite 'expensive' in terms of Db hits. I dont want to start optimizing at this stage - though with me trying to hit a deadline, I may end up not optimising at all. Currently the page requires 18 (thats right eighteen) hits to the db. I am already using joins, and some of the queries are UNIONed to minimize the trips to the db. My local dev machine can handle this (page is not slow) however, I feel if I release this into the wild, the number of queries will quickly overwhelm my database (mySQL). I could always use memcache or something similar, but I would much rather continue with my other dev work that needs to be completed before the deadline - at least retrieving the page work, its simply a matter of optimization. My question therefore is - is 18 db queries for a single page retrieval completely outrageous - (i.e. I should put everything on hold and optimize the hell of the retrieval logic), or shall I continue as normal, meet the deadline and release on schedule and see what happens?

    Read the article

  • How can i test my DB speed? (Learning)

    - by acidzombie24
    I have design a database. Theres no columns with indexing, nor any code for optimizing. I am positive i should index certain columns since i search them a lot. My question is HOW do i test if any part of my database will be slow? ATM I am using sqlite and i will be switching to either MS Sql or MySql based on my host provider. Will creating 100,000 records in each table be enough? Or will that always be fast in sqlite and i need to do 1mil? Do i need 10mil before a database will become slow? Also how do i time it? I am using C# so should i use StopWatch or is there a ADO.NET/Sqlite function i should use?

    Read the article

  • Can jQuery perform a compound select against the top level only? (a.k.a. "How to avoid chaining chil

    - by harpo
    Basically, is there a way to write a.children('.outer').children('.inner') without the intermediate selector? I can't write $('.outer > .inner', a) because I don't want to do full-depth search against a — I know that the .outer elements are immediate children of a. It's partly a matter of "elegance", but partly because I'm trying to avoid "throwaway" element sets. Yes, jQuery may in effect do the same thing, but it has a better chance of optimizing (at least in theory), when it knows the full query's intent.

    Read the article

  • Programming Quiz [closed]

    - by arin-s-rizk
    Hi one of my mates sent me this quiz see if you can guess the answers I will post mine later. In this quiz, some tasks related to the compilation process are listed. For each one of them, specify the part of the compiler that is responsible of performing it. Here are the possible answers: Lexical analyzer Parser Semantic analyzer None of the above Just fill the right choice (the number only) in the blank after each task: Checking that the parentheses in an expression are balanced _ _ _ _ _ Removing comments from the program _ _ _ _ _ Grouping input characters into "tokens" _ _ _ _ _ Reporting an error to the programmer about a missing (;) at the end of a C++ statement _ _ _ _ _ Checking if the type of the RHS (Right-Hand Side) of an assignment (=) is compatible with the LHS (Left-Hand Side) variable _ _ _ _ _ Converting the (AST) Abstract Syntax Tree into machine language _ _ _ _ _ Reporting an error about a strange character like '^' in a C++ program _ _ _ _ _ Optimizing the AST _ _ _ _ _

    Read the article

  • How to use the boost lexical_cast library for just for checking input

    - by Inverse
    I use the boost lexical_cast library for parsing text data into numeric values quite often. In several situations however, I only need to check if values are numeric; I don't actually need or use the conversion. So, I was thinking about writing a simple function to test if a string is a double: template<typename T> bool is_double(const T& s) { try { boost::lexical_cast<double>(s); return true; } catch (...) { return false; } } My question is, are there any optimizing compilers that would drop out the lexical_cast here since I never actually use the value? Is there a better technique to use the lexical_cast library to perform input checking?

    Read the article

  • Can jQuery perform a compound select against the top level only?

    - by harpo
    Basically, is there a way to write a.children('.outer').children('.inner') without the intermediate selector? I can't write $('.outer > .inner', a) because I don't want to do full-depth search against a — I know that the .outer elements are immediate children of a. It's partly a matter of "elegance", but partly because I'm trying to avoid "throwaway" element sets. Yes, jQuery may in effect do the same thing, but it has a better chance of optimizing (at least in theory), when it knows the full query's intent.

    Read the article

  • The D Programming Language for Game Development

    - by n2liquid
    Hi all, Recently I've been bothered because I reached a point in which C++ (even 0x) felt very limited, so I started looking for alternatives. Forget Java, C#, Python or Ruby. I still like the low-level nature of C++ and I'm not fond of virtual machines. Further, I'm a game engine developer, so I have to develop core routines which must be really fast, and lately I've been hungry for code expressiveness. C++ is an almost-there language for me, but there are many exceptions on how to use templates, and GCC isn't optimizing stuff as well as I'd hoped it would. So I'm considering to start learning D. Do you think it will suffice my needs as a game developer? I'm weary because I've never heard of D being used for that. Thanks!

    Read the article

  • Converting keys of an array/object-tree to lowercase

    - by tstenner
    Im currently optimizing a PHP application and found one function being called around 10-20k times, so I'd thought I'd start optimization there. function keysToLower($obj) { if(!is_object($obj) && !is_array($obj)) return $obj; foreach($obj as $key=>$element) { $element=keysToLower($element); if(is_object($obj)) { $obj->{strtolower($key)}=$element; if(!ctype_lower($key)) unset($obj->{$key}); } else if(is_array($obj) && ctype_upper($key)) { $obj[strtolower($key)]=$element; unset($obj[$key]); } } return $obj; } Most of the time is spent in recursive calls (which are quite slow in PHP), but I don't see any way to convert it to a loop. What would you do?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >