Search found 186 matches
- Mon 24 Jul 2006 22:16
- Forum: MySQL Data Access Components
- Topic: TMyTable/TMyQuery
- Replies: 3
- Views: 2826
Search a litle bit in this forum , advantages are a lot.. Imagine a table with 10.000 records.. and you only need some of them.. TTable will fetch all (Inncesary traffic over lan/wan, increases pc memory use, loads mysql etc).. with TMyQuery you only select what you need, faster, less memory, less traffic.. this plus other advantages like doing join's, union, etc.
- Tue 04 Jul 2006 22:31
- Forum: MySQL Data Access Components
- Topic: Slow query opening
- Replies: 4
- Views: 3196
If it's connecting to the database, check this:
http://dev.mysql.com/doc/refman/5.1/en/dns.html
Add the skip-name-resolve to your my.ini/cnf
If it's when opening the query (you're already connected), then look at the amount of data fetched. If you select all fields and only need a few ones, then adjust your query to retrieve only data you need. Retrieving big blobs also takes its time, sometimes it's better to get blobs only when you need them.
Regards
http://dev.mysql.com/doc/refman/5.1/en/dns.html
Add the skip-name-resolve to your my.ini/cnf
If it's when opening the query (you're already connected), then look at the amount of data fetched. If you select all fields and only need a few ones, then adjust your query to retrieve only data you need. Retrieving big blobs also takes its time, sometimes it's better to get blobs only when you need them.
Regards
- Thu 22 Jun 2006 22:03
- Forum: MySQL Data Access Components
- Topic: Correct SQL Statement to Update Two Columns
- Replies: 4
- Views: 3111
It should be:
QuotedStr add's Quotes to text (") so SQL knows it's a string.
Best way anyway would be:
Where second example you only need to set SQL once, and then everytime you need to update, just fill the params and execute query.
Code: Select all
Datamodule1.Update_Case.sql.add('UPDATE casemaster SET survey_date1 = curdate(), surveyor1 =' + QuotedStr(sys.currentuser));
Best way anyway would be:
Code: Select all
Datamodule1.Update_Case.sql.Clear;
Datamodule1.Update_Case.sql.add('UPDATE casemaster SET survey_date1 = curdate(), surveyor1 = :surveyor1');
Datamodule1.Update_Case.sql.add('where inventory.casemaster.autoid = :autoid' );
Datamodule1.Update_Case.ParamByName('surveyor1').AsString := sys.currentuser;
Datamodule1.Update_Case.ParamByName('autoid').AsString := CaseMasterid.text;
Datamodule1.Update_Case.Execute;
- Tue 20 Jun 2006 20:44
- Forum: MySQL Data Access Components
- Topic: TMemoField update
- Replies: 4
- Views: 5194
Best is not to use reserved words as field/table/view etc names. Have a look at http://dev.mysql.com/doc/refman/5.0/en/ ... words.html to know which ones are reserved. This will avoid you a lot of problems
- Sun 11 Jun 2006 22:44
- Forum: MySQL Data Access Components
- Topic: Using TMyQuery Parameters with Blob field
- Replies: 1
- Views: 2979
Code: Select all
Params.ParamByName('ABlobField').LoadFromFile(....);
or
Params.ParamByName('ABlobField').LoadFromStream(...);
- Sun 11 Jun 2006 22:42
- Forum: MySQL Data Access Components
- Topic: Delphi 2006 [MyDac] usign paramer in sql statement.
- Replies: 3
- Views: 2928
Code: Select all
QryStorico.SQLInsert.Add('INSERT INTO storico(COD_STOR, DESC_STATO, MOTIVO_STATO) VALUES (:COD_STOR, DESC_STATO, :MOTIVO_STATO)');
Regards
- Wed 07 Jun 2006 22:10
- Forum: MySQL Data Access Components
- Topic: Socket 10054 Error
- Replies: 3
- Views: 4622
- Wed 07 Jun 2006 22:08
- Forum: MySQL Data Access Components
- Topic: Newbie question about TMyQuery and TMyTable
- Replies: 2
- Views: 2614
Well, TMyQuery lets you drill-down data to what you need, you can also join tables etc. If you have for example a 1000 records, and you only need to show 5 records which have some common reference, then with a TMyQuery you just select those 5 (example select * from table where condition = xxx), and it would retrieve only those records from server, with TMyTable everything is retreived and then procesed locally. But best to know about why to use TMyQuery would be knowing SQL.
- Wed 24 May 2006 22:20
- Forum: MySQL Data Access Components
- Topic: preventing a record from being updated
- Replies: 2
- Views: 2310
- Mon 22 May 2006 21:43
- Forum: MySQL Data Access Components
- Topic: MyConnectDialog
- Replies: 3
- Views: 2713
- Sun 14 May 2006 21:20
- Forum: MySQL Data Access Components
- Topic: starting speed
- Replies: 6
- Views: 3412
Set compress option to true at the TMyConnection is first thing to change to speedup over WAN. Other issues are basically optimize query's, just select the minimal information that you need (If for example you have a table with 20 fields, and only need 3, select only those 3), also drill down the number of rows returned to the value you really need (Make as much as you can with querys instead of local delphi code). Other more advanced tricks are setting up for example a local replication server (Data is replicated to another server that can be on the other side of WAN), for this i recommend taking a look at mysql website.
Regards
Regards
- Tue 09 May 2006 21:32
- Forum: MySQL Data Access Components
- Topic: BLOB Fields over 1MB
- Replies: 2
- Views: 2636
- Tue 09 May 2006 21:29
- Forum: MySQL Data Access Components
- Topic: Slow updating and refreshing
- Replies: 5
- Views: 3038
- Thu 04 May 2006 21:30
- Forum: MySQL Data Access Components
- Topic: Adding a New Record
- Replies: 3
- Views: 2852
- Wed 03 May 2006 21:13
- Forum: MySQL Data Access Components
- Topic: MyDAC WAN performance
- Replies: 3
- Views: 2725