Forum Replies Created
-
AuthorPosts
-
peterlaursen
ParticipantI added your request here:
peterlaursen
Participantbtw .. just execute the SQL
Code:alter table ´sometable` engine = memoryBut do not forget that the table and the disappear forever when server is closing down!
peterlaursen
ParticipantMaybe this will interest you too!
peterlaursen
ParticipantWith MySQL server 5.1 and higher we support it.
See screnshot from my local 6.04 server
[attachment=852:memory.jpg]
The implementation is described here:
http://webyog.com/faq/content/29/135/en/wh…ghlight=engines
There is no `engines`table in Information_Schema before 5.1 and there also is no 'have_memory' system variable (in my 5.0.51a). But I think we could hardcode it for versions before 5.1, as I think it will always be there!
Please give a few days for us to discuss!
peterlaursen
ParticipantI think you should check if Data Sync suits your needs.
If for some reason it does not you are welcome to explain why, of course.
But I think it would make life easier for you!
SQL statements need not be recorded in a text-file ('script') to be executed! SJA data sync simply execute those at once (but we do plan an option to let it run in some 'virtual mode and record a 'script').
peterlaursen
ParticipantI am talking about SQLyog (Enterprise) Data Synchronisation feature! Try read about it in the help file!
No need to export scripts to sync a test/development and a production database when it can be done much easier!
So I think we have the feature in our (Enterprise) product already required for the task.
Supporting this request will be low priority. Also the other alternatives to plain INSERTs (INSERT IGNORE INTO, REPLACE INTO) will probably be considered for the SJA 'Scheduled backup' tool (that is also an Enterprise feature) only and not the GUI 'export' tool.
Sorry, but sometimes we will have to ask people to pay for features!
peterlaursen
Participantyes .. it is the problem!
MySQL support those 'objects' (Store Procedures and Functions, Views and Triggers) from version 5.0 only. Events from 5.1.
peterlaursen
ParticipantI think you are quoting a few times too much!
One tip:
Just test using simple SELECT to verify expresssions!
select unix_timestamp(date_sub(concat(date(now()),' 04:00:00'),interval 7 hour)); — is OK
select unix_timestamp(date_sub('concat(date(now()),' 04:00:00')',interval 7 hour)); — error, meaningless quotes
See this example:
Code:create table `test`.`tstest`( `id` int NOT NULL AUTO_INCREMENT , `ts` timestamp , PRIMARY KEY (`id`));
insert into `tstest`(`id`,`ts`) values ( '1',CURRENT_TIMESTAMP);
— timestamp inserted was '2008-03-14 23:46:24'
insert into `tstest`(`id`,`ts`) values ( '2','2008-03-13 23:46:24');
— 2nd row now contains a time exactly 24 hours before 1st row!— there are now 2 rows in table.
— As we want to retrieve rows less than 7 hours old only, only 1st row should come in resultselect * from `tstest`
where unix_timestamp(ts)
— filter result on timestamp column data “newer than 7 hours before today 4:00”
between unix_timestamp(date_sub(concat(date(now()),' 04:00:00'),interval 7 hour ))
— ignore possible wrong 'too new' (future time) data
and unix_timestamp(now());returns
Code:id ts
—— ——————-
1 2008-03-14 23:46:24But this may replace the last select of course
Code:select * from `tstest` where unix_timestamp(ts) >
unix_timestamp(date_sub(concat(date(now()),' 04:00:00'),interval 7 hour ));(and btw I think also a solution not using unix_timestamp() is possible – and I did not check date_sub() in detail, but it seems you know it!)
peterlaursen
ParticipantLet me add that we will probably add an option to 'recalculate canvas' (auto-size table) from next beta. It is too late now to push into beta1.
With beta1 you can use the dropdown in the icon bar for a table (either option here will recalculate and redraw – but only that single table will be redrawn)
Redraw will always 'honour' the upper left corner of every table!
peterlaursen
Participantbtw: did you consider using data sync for this?
peterlaursen
Participantthanks for the detailed explanation.
I saved time researching this then!
Added here: http://code.google.com/p/sqlyog/issues/det…6&start=200
peterlaursen
ParticipantOK ..
actually we have discussed supporting optionally
INSERT IGNORE into
REPLACE into
can you tell the difference beween
INSERT INTO ON DULICATE KEY UPDATE
and
REPLACE INTO
… if there is any?
peterlaursen
Participant1) you can have them both installed to two different folders. You only need to create shortcuts manually. I do not think there is any danger replacing, but users always find some small issues in early betas that we failed to find!
2) refreshing canvas and ALTER TABLE will now not change the size of the table windows anymore (just fixed in trunk). I think that maybe we should recalculate the window of the altered table and let it grow (but not shrink) if required. But in beta1 we will not resize automatically. We let the user do this.
(note: this was edited 10 min's after first posting)
peterlaursen
ParticipantQuote:so this becomes …Was it a question or a statement?
peterlaursen
Participantone more idea:
1) use notifications service to build the `nightlytable` on the remote host as described
2) use datasync to transfer this table to a server on your local machine
3) if you want a file then use notifications service to SELECT INTO OUTFILE on local machine (or use 'scheduled backup' if you want a SQL dump).
next build a batch file with those 3 SJA jobs (and additional small SJA jobs and OS commands deleting old data and files if required) and schedule the batchfile.
-
AuthorPosts